I am using Microsoft Visual Studio .NET to build my ASP.NET web application. I have several WebForms, and I cannot figure out how to code the loading of a form if a user clicks a button.
Lets say I have a WebForm named WebForm1 with a button on it and when the button is clicked I want to show WebForm2.
I've tried these things so far to show the other form:
'This code says "Show" cannot be found
Dim openForm As WebForm2
openForm = New WebForm2()
openForm.Show()
'"Show" and "Load" can't be found
WebForm2.Show() 'or
WebForm2.ShowForm() 'or
WebForm2.Load()
If you know the answer to my question, please then tell me how to close or hide WebForms also, thank you.
Lets say I have a WebForm named WebForm1 with a button on it and when the button is clicked I want to show WebForm2.
I've tried these things so far to show the other form:
'This code says "Show" cannot be found
Dim openForm As WebForm2
openForm = New WebForm2()
openForm.Show()
'"Show" and "Load" can't be found
WebForm2.Show() 'or
WebForm2.ShowForm() 'or
WebForm2.Load()
If you know the answer to my question, please then tell me how to close or hide WebForms also, thank you.