Referring to public variables in asp.net vb

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?
 
M

Mark Rae [MVP]

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,216
Latest member
Best cryptoconsultant

Latest Threads

Top