Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Learning to use JavaScript with ASP.Net
Message
De
21/05/2009 09:15:22
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
ASP.NET
Application:
Web
Divers
Thread ID:
01400821
Message ID:
01401248
Vues:
49
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform