Author: mm8 | Posted on: 6/23/2008 5:51:20 AM | Views : 327

I'm trying to change the value of a HiddenField with a JavaScript when a page is loaded and print the value in a label but I don't get any result...
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
LoadScript();
}

private void LoadScript()
{

ClientScriptManager clientScriptManager = Page.ClientScript;
StringBuilder sb = new StringBuilder();

sb.Append(@"<script language='javascript'>");
sb.Append(@"document.getElementById('HF').value = 'True';");
sb.Append(@"<");
sb.Append(@"/script>");

if (!clientScriptManager.IsStart ...

Go to the complete details ...