Help: Usercontrol - different behaviors based on parent

Discussion in 'ASP .Net' started by VB Programmer, Jul 1, 2003.

  1. 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?
    VB Programmer, Jul 1, 2003
    #1
    1. Advertising

  2. Re: Usercontrol - different behaviors based on parent

    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




    "VB Programmer" <> wrote in message
    news:eaQmNT#...
    > 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?
    >
    >
    William F. Robertson, Jr., Jul 1, 2003
    #2
    1. Advertising

  3. Re: Usercontrol - different behaviors based on parent

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

    "William F. Robertson, Jr." <> wrote in message
    news:OVO7hj%...
    > 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
    >
    >
    >
    >
    > "VB Programmer" <> wrote in message
    > news:eaQmNT#...
    > > 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?
    > >
    > >

    >
    >
    VB Programmer, Jul 1, 2003
    #3
  4. Re: Usercontrol - different behaviors based on parent

    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


    "VB Programmer" <> wrote in message
    news:uySiXI$...
    > Are you saying to use a public var, like CurrentParentForm, to keep track

    of
    > which one their looking at?
    >
    > "William F. Robertson, Jr." <> wrote in message
    > news:OVO7hj%...
    > > 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
    > >
    > >
    > >
    > >
    > > "VB Programmer" <> wrote in message
    > > news:eaQmNT#...
    > > > 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?
    > > >
    > > >

    > >
    > >

    >
    >
    William F. Robertson, Jr., Jul 1, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sylvain Munaut
    Replies:
    2
    Views:
    2,154
    Sylvain Munaut
    Dec 22, 2004
  2. wejiv
    Replies:
    1
    Views:
    527
    Anthony Jones
    Aug 26, 2008
  3. Alex Vinokur
    Replies:
    9
    Views:
    941
    Gerhard Fiedler
    Mar 22, 2011
  4. Mark Kremers

    Behaviors in Behaviors

    Mark Kremers, Jul 31, 2003, in forum: Javascript
    Replies:
    0
    Views:
    117
    Mark Kremers
    Jul 31, 2003
  5. Weston C
    Replies:
    1
    Views:
    85
    Eric Bohlman
    Dec 26, 2003
Loading...

Share This Page