C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Errors and Solutions » General »

Display a javascript message box in asp.net application


Posted Date: 26 May 2009    Resource Type: Errors and Solutions    Category: General
Author: Manoranjan SahooMember Level: Gold    
Rating: 1 out of 5Points: 5



Hi,
Display JavaScript Message box, which is created dynamically in the code behind

To display a message you can put the following code any where in the code behind page.
you must place only in between any functions.

Code
ClientScriptManager cs = Page.ClientScript;
Type ty = this.GetType();
cs.RegisterStartupScript(Type type, string key, string script,bool addScripttag);


ex : cs.RegisterStartupScript(ty, "Key Value", "alert('message')", true);

Enjoy this code to execute any type of javascript code
i check for this only.
You can check with other javascript code with this.

Thank You.



Responses

Author: VMRK    29 Jul 2009Member Level: Silver   Points : 0
good one really interesting


Author: Hari Nagaraj    19 Aug 2009Member Level: Bronze   Points : 1
As i want to display the message box with yes or no button in it.
If Yes is clicked want to execute some
similarly when No is clicked.
can any have the solution regarding this....



Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Show Java Script Message in asp.net  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: KnownType
Previous Resource: Conversion from type 'DBNull' to type 'String' is not valid
Return to Discussion Resource Index
Post New Resource
Category: General


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use