Page and Web UI

P

poifull

Hello,

Is it possible to declare an object in my Web UI Control, store it in the
Page and share the object with other control added to the page?

Thanks in advance,
poifull
 
K

Karl Seguin

Yes,
Pages and user controls are like any other class. The only trick is knowing
to strongly type them

Add a property to your page called "MyObject" of type whatever it is, and
from ur user controls you can access it via:

((MyPageType)Page).MyObject; //c#
ctype(Page, MyPageType).MyObject 'vb.net

You can learn more form:
http://openmymind.net/index.aspx?documentId=9

Karl
 

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,206
Latest member
SybilSchil

Latest Threads

Top