I have written a js function in aspx like below
window.onload = function () { document.getElementById('grid-overlay').style.display = 'block'; } Now I want to call this function in code behind. I tried like below:-
if (dtmkey.Rows.Count > 0) { HidMode.Value = "M"; HidMKey.Value = dtmkey.Rows[0]["mkey"].ToString(); var scriptSource = "function onload() { alert(""); };\n"; ScriptManager.RegisterClientScriptBlock(Page, this.GetType(), "HelpScript", scriptSource, true); // Not working } kindly suggest what is wrong