Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 how to display message box on web application

Author  Topic 

chiragvm
Yak Posting Veteran

65 Posts

Posted - 2006-06-16 : 02:46:50
Hello all,

I am new in asp.net developer,I would like to ask a simple question. how to
display a message box in web application using asp.net?


If I just use


Private Sub btnOK_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles btnOK.Click
MsgBox("please enter the correct user name and password",
MsgBoxStyle.Information, "Failed in login")
End Sub


when it run, it prompt : It is invalid to show a modal dialog or form when
the application is not running in UserInteractive mode. Specify the
ServiceNotification or DefaultDesktopOnly style to display a notification
from a service application.


Anyone can help me to solve this question? Thanks.


spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-06-16 : 08:26:57
any messagebox in your code will be displayed on the web server and so it won't be accessible to the client.

to display a message box on the client you muist use javascript
alert("Some mesage")

Go with the flow & have fun! Else fight the flow
Blog thingie: [URL="http://weblogs.sqlteam.com/mladenp"]
Go to Top of Page
   

- Advertisement -