Cari Blog Ini

08 September 2011

How to Connected New Form in ASP.NET

Form Name:
Form1.vb
Form2.vb

If in Form1.vb want to access Form2.vb, we must create an instances of forms and then we will display it.


In Form1.vb:

'-------------------------------------------------------
Dim myFirstForm As Form2
Dim mySecondForm As Form2
Dim myThirdForm As Form2



Set myFirstForm = New Form2
Set mySecondForm = New Form2
Set myThirdForm = New Form2

myFirstForm.Show
mySecondForm.Show
myThirdForm.Show
'-------------------------------------------------------

or

'-------------------------------------------------------
Dim myFirstForm As Form2 = New Form2
Dim mySecondForm As Form2 = New Form2
Dim myThirdForm As Form2 = New Form2

myFirstForm.Show
mySecondForm.Show
myThirdForm.Show
'-------------------------------------------------------


Sumber:
http://msdn.microsoft.com/en-us/library/aa289529(v=vs.71).aspx