mellomel70
Programmer
Hi - I have an ASP.Net 2.5 application and I need to call a javascript function when one of the pages loads initially. I've tried:
where EnableCheckboxes is a javascript function on the page. This doesn't work (doesn't disable the CheckBoxList), although the EnableCheckboxes function DOES work when I call it in other ways, so I'm sure that the problem is that I'm not calling it properly on page load.
I've tried:
which DOES work, so I know I'm on the right track, but how do I do this?
Thanks!
Code:
string ScriptToCall = @"EnableCheckboxes(" + cblDetails.ClientID + ", false);";
ClientScript.RegisterStartupScript(this.GetType(), "addScript", ScriptToCall, true);
where EnableCheckboxes is a javascript function on the page. This doesn't work (doesn't disable the CheckBoxList), although the EnableCheckboxes function DOES work when I call it in other ways, so I'm sure that the problem is that I'm not calling it properly on page load.
I've tried:
Code:
ClientScript.RegisterStartupScript(this.GetType(), "addScript", "alert('Hello');", true);
which DOES work, so I know I'm on the right track, but how do I do this?
Thanks!