Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > web usercontrol as property of other classes possible?

Reply
Thread Tools

web usercontrol as property of other classes possible?

 
 
Arthur Milfait
Guest
Posts: n/a
 
      06-22-2008
hey there,

i'd like to do some wild thing like this:

imagine a simple page with a navigation menu and an iframe. clicking
on links in the menu loads the according page in the iframe. the menu
is a web-usercontrol of type "MenuList" that uses web-usercontrols of
type "MenuItem" for each link. so far nothing special. but now i'd
like each page that can be loaded to be of an interface/type
"IMenuItem" that publishes a getter for the web-usercontrol of type
"MenuItem", that actually is inserted dynamically into the "MenuList"-
control.
This means ...
1. the page-object has to have a property of type web usercontrol that
is actually not a part of the control-collection of that page.
2. the page itself has to be instanciated somehow to be in some
collection or array of type "IMenuItem[]" in the "MenuList"-control.
are such things by any means possible? i could not figure out how to
do this, and i know how to dynamicaly load controls into other
controls and pages. but that is not what i want here.

why do i wnat to do such a weird thing anyway? the idea emerged out of
the simple wish to encapsulate code into the right classes, instead of
having an additional class that does all the interface-stuff for each
page or control. having the controls as properties in the objects that
own the data would tidy things up very much!

i would apprechiate any replies that either suggest how to do it or
asure me that this is not possible at all with the current concept of
asp.net or suggest a solution that is different but also helps me
straighten the class layout.

thanks in advance,
arthur
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Using property() to extend Tkinter classes but Tkinter classesare old-style classes? Terry Reedy Python 5 11-30-2010 06:49 PM
web usercontrol + delegates or specialised usercontrol base class info@record-play.com ASP .Net 0 06-23-2006 09:41 AM
Getting a property of a control inside a usercontrol, from another usercontrol Fabiano ASP .Net 2 06-03-2005 09:56 AM
Nested classes within other classes Tony Johansson C++ 2 12-14-2004 11:41 AM
Web Usercontrol in a Web Usercontrol not displaying... Kan Grewal ASP .Net Web Controls 2 07-07-2004 08:12 AM



Advertisments