Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Tye Thompson   on Jul 01 In Asp.net Category.

  
Question Answered By: Jennie Harris   on Jul 01

If using RegisterClientScriptBlock than you can query if you allready register your client-side script.
Like in this example from msdn:


// Form the script that is to be registered at client side.
String scriptString = "<script language=JavaScript> function DoClick() {";
scriptString += "myForm.show.value='Welcome to Microsoft .NET'}<";
scriptString += "/";
scriptString += "script>";

if(!this.IsClientScriptBlockRegistered("clientScript"))
this.RegisterClientScriptBlock("clientScript", scriptString);

IMHO It's easyer and safer to control you code  flow like this than just fill the Literal control.

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Problem with Focusing the Text box on Page Load Or get search suggestion and latest updates.


Tagged: