MessageBox & Show WebForm VB.NET 2003

osl

Member
Joined
Jun 8, 2006
Messages
20
Programming Experience
5-10
Hi,
  • How to declare a messagebox? Below is sample of the codes. When view in browser, it will give this error message. 'New MessageBox is not declared'.
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
MessageBox.show("Testing")
End Sub
  • How to show/hide a webform. ie. form1 calling form2?
Syntax like 'form2.show' doesn't work.

Thanks!
 
A webapplication is not the same as a windows app. The 2 functions you are mentioning are typical windows app features and don't exist in asp.net. If you want a messagebox you should use javascript

if you want form1 to call form2 you should do a response.redirect("form2.aspx") Keep in mind that unlike windows apps the "instance" of form1 doesn't exist any more.
 
Can MessageBox be used in asp.net?

suddenelfilio,
Thank you very much but what about MessageBox? Can it be used in asp.net? Or just display message on label is the only way?

Appreciate very much for your help.
 
Back
Top