Referring to public variables in asp.net vb

  • Thread starter Thread starter OK
  • Start date Start date
O

OK

How can I access public variables of an aspx.vb page within the code of
another aspx.vb?

Imagine the following :

Test.aspx.vb holds a public variable Mode 1:
Public Mode1 as boolean

How can I Refer to the variable Mode1 within the vb code in another aspx.vb?
 
How can I access public variables of an aspx.vb page within the code of
another aspx.vb?

Imagine the following :

Test.aspx.vb holds a public variable Mode 1:
Public Mode1 as boolean

How can I Refer to the variable Mode1 within the vb code in another
aspx.vb?

You need to step back for a second...

The partial classes behind aspx pages are used only while the page is being
generated.

Although you *can* instantiate them (they're just classes like any other
class), if you have functionality which is required by more than one page
you should really move it into a separate class...
 
Back
Top