Recent Posts

Posts RSS

How to Pop-up Messagebox in Web Application


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 ';

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:

kick it on