Need help using interfaces to exchange properties between pages

D

darrel

Thanks to some help from Karl yesterday, I've discovered the use of
Interfaces to allow usercontrols to communicate information between them
using the Interface as the 'parent' rather than the aspx class.

I don't quite understand properties, though. ;o)

This is what I have thus far:

I declared a interface:

-----------------------------------------------
Public Interface IGetGlobalPageProperties
Property ContentID()
End Interface
-----------------------------------------------

On my page.aspx, I implemented it:

-----------------------------------------------
Property contentID() as object Implements IGetGlobalPageProperties.contentID
get
???
End Get
set
???
end set
End property
-----------------------------------------------

The ??? is where i'm stumped. What I now want to happen is that one of my
usercontrols is going to set some properties, and that these properties will
then be read by other usercontrols.

How do I set the 'contentID' property in the above interface implementation?
Can the above read the contentID string located in the usercontrol?
(userControlClass.contentID?)

-Darrel
 

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top