How to popup window and messages in the asp.net

Posted by Er.deepakdalal under Regular Expressions on 4/28/2010 | Views : 26819 | Status : [Member] | Replies : 5
Hi

I have to show messages on different different instances in my web application, now i am using the MessageBox.Show() method it works but the problem is it come in the background can any body tell me how i popup window or any other alert message which come in the front of the browser.




Responses

Posted by: Syedshakeer on: 4/28/2010 [Member] Starter

Up
0
Down
Check the following link for alert message box, www.dotnetfunda.com/codes/code222-alert-message-box-in-aspnet.aspx

Syed Shakeer Hussain

Er.deepakdalal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 4/28/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Nice Link Syedshakeer

Er.deepakdalal you can use

response.write("<script>alert('Hello world');</script>");



This goes in the center of the page, Messagebox.show was made for windows application not web

Thank you for posting at Dotnetfunda
[Administrator]

Er.deepakdalal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Syedshakeer on: 4/28/2010 [Member] Starter

Up
0
Down
Hi Vuyiswamb,the above link is my code.ThankYou..

Syed Shakeer Hussain

Er.deepakdalal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 4/29/2010 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Nice work , Keep up the good work.



Thank you for posting at Dotnetfunda
[Administrator]

Er.deepakdalal, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pavanandey on: 4/29/2010 [Member] Bronze

Up
0
Down
Hi,

string strScript = "<script language='javascript'>alert(\'" + Message+ "\');</script>";
ScriptManager.RegisterStartupScript(this, this.GetType(), "PopupCP", strScript, false);

when ur working with script manager the above code work fine.

Thanks
Pavan Kumar
Mark Answer if this fits the need

Er.deepakdalal, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response