Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Learning to use JavaScript with ASP.Net
Message
From
21/05/2009 09:15:22
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
ASP.NET
Application:
Web
Miscellaneous
Thread ID:
01400821
Message ID:
01401248
Views:
47
Hi Paul,

I know have this in my button event.
// Inject the script in the page to call EditAfterNew
		//
		// Setup the Type and ScriptName
		Type csType = this.GetType();
		string csName = "PersonEditorScript";

		// Get a reference to the ClientScript Manager of the page class
		ClientScriptManager csm = Page.ClientScript;

		// Check to see if the startup script is already registered
		if (!csm.IsStartupScriptRegistered(csType, csName))
		{
			string csScript = string.Format("EditAfterNew('{0}');", this.grdAka.ClientID);
			Page.ClientScript.RegisterClientScriptBlock(csType, csName, csScript, true);
		}
The fourth parameter according to MSDN is a value indicating whether to add script tags which I presume needs to be true since they are not included in the csScript string. What causes this script to run when the page is re-loaded?
Thanks
Tim
Timothy Bryan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform