I need to run dynamic javascript code into pageload event ..and i need some default values placed on Textboxes using this script
i wrote this sample code but i am getting javascript error ..
for ex:-
protected void Page_Load(object sender, EventArgs e)
{
string script = string.Empty;
script += "<script language='javascript'>";
script += "document.getElementById('TextBox1').value='a2'";
script += "</";
script += "script>";
ClientScript.RegisterClientScriptBlock(this.GetType(), "Error", script);
}
";
script += "document.getElementById('TextBox1').value='a2'";
script += "";
ClientScript.RegisterClientScriptBloc ...
Go to the complete details ...