Help: Usercontrol - different behaviors based on parent

  • Thread starter Thread starter VB Programmer
  • Start date Start date
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?
 
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
 
Are you saying to use a public var, like CurrentParentForm, to keep track of
which one their looking at?
 
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
 
Back
Top