I generally, in my Function Library, have a Subroutine called
DisplayMessage - but you can call it MsgBox or anything else - here's how it
is written:
Public Sub DisplayMessage(ByVal webPage As Object, ByVal Message As String)
Dim msgDisplay As String = "<script language='JavaScript'>alert('" &
Replace(Message, "'", "\'") & "');</script>"
webPage.ClientScript.RegisterStartupScript(Me.GetT ype, "DisplayMessage",
msgDisplay)
End Sub
Then, to use it, inside your page, just do this:
DisplayMessage(me, "This is my message")
David Wier
MVP/ASPInsider
http://aspnet101.com http://aspexpress.com
"ghostwolf" <yl***@roctec.com.hkwrote in message
news:Op***************@TK2MSFTNGP05.phx.gbl...
Hi, I want to have a message box prompted out in the browser, just like
what
normal windows application does (DoModal). How can I do it if using the
ASP.NET? Thanks a lot.
Regards,