Help: Usercontrol - different behaviors based on parent

V

VB Programmer

I have a usercontrol that is basically a webapp-wide menu (dropdownlists,
etc...)

Is there a way I can program a certain dropdownlist in the uc to act
differently BASED on who is currently using the uc?
 
W

William F. Robertson, Jr.

Yes you can.

You can either do it with a switch statement depending on the user, or a
session/placeholder.

I guess it really depends on how differently the different user's UC will
look.

But to answer you question...yes.

HTH,

bill
 
V

VB Programmer

Are you saying to use a public var, like CurrentParentForm, to keep track of
which one their looking at?
 
W

William F. Robertson, Jr.

You can have the user control, like on its Page_Load method, check to see
what user it is, and then change the content of the page that way. If you
use the same logic to decide on the content of the page on first load and
post back, that control will keep track itself of what content was on the
page.

bill
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top