How to Pop-up Messagebox in Web Application
Posted by
Manas
at
11:55:00 AM
Reactions:
Like in windows application you can show your messagebox in web applicaion also. First you have to write a simple javascript code in yourpage HTML page itself or in another file with .js extension and give the path to your HTML page file where you want to use it. Your javascript code should be shown like bellow:
function WebMsgBox() {
var msg = 'Good Morning .Net ';
alert(msg);
}
And after that you can call this function from your serverside page code (.cs/.vb) file by using ScriptManager as shown bellow:
ScriptManager.RegisterStartupScript(this, this.GetType(), "Welcome Message", "WebMsgBox();", true);
And when fire that event the WebMsgBox will shown as bellow:
Labels: ASP.net Javascript
Subscribe to:
Post Comments (Atom)



0 comments:
Post a Comment