Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   Need help using interfaces to exchange properties between pages (http://www.velocityreviews.com/forums/t95061-need-help-using-interfaces-to-exchange-properties-between-pages.html)

darrel 01-21-2005 07:41 PM

Need help using interfaces to exchange properties between pages
 
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




All times are GMT. The time now is 04:09 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.