Pages

Saturday, May 31, 2014

How to create a Message Box in ASP.NET - C#

If you want to create  message box in  ASP.NET  ,you will have to call java script function .Mostly, That's
the best way to have a message box in asp.net web application .

So here First ,.   I'm using RegisterStartupScript  method .This
methods is used to dynamically insert client script into the webpage at run-time.


Page.ClientScript.RegisterStartupScript(Type type, String key, String script);


type - The type of the client script block. This parameter is to retrieve the type of the control that is registering the script.

 key -The string that uniquely identifies the script block.

 script - The script literal.

So for our Alert box or the Message box


Check this video for clear definition (or steps)




Or you can just Simply Write



No comments:

Post a Comment