Help: Usercontrol - different behaviors based on parent

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • VB Programmer

    Help: Usercontrol - different behaviors based on parent

    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.

    #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" <growNO-SPAM@go-intech.com> wrote in message
    news:eaQmNT#PDH A.1216@TK2MSFTN GP11.phx.gbl...[color=blue]
    > 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?
    >
    >[/color]


    Comment

    • VB Programmer

      #3
      Re: Usercontrol - different behaviors based on parent

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

      "William F. Robertson, Jr." <wfrobertson@kp mg.com> wrote in message
      news:OVO7hj%23P DHA.2160@TK2MSF TNGP11.phx.gbl. ..[color=blue]
      > 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" <growNO-SPAM@go-intech.com> wrote in message
      > news:eaQmNT#PDH A.1216@TK2MSFTN GP11.phx.gbl...[color=green]
      > > I have a usercontrol that is basically a webapp-wide menu[/color][/color]
      (dropdownlists,[color=blue][color=green]
      > > 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?
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • William F. Robertson, Jr.

        #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" <growNO-SPAM@go-intech.com> wrote in message
        news:uySiXI$PDH A.560@TK2MSFTNG P10.phx.gbl...[color=blue]
        > Are you saying to use a public var, like CurrentParentFo rm, to keep track[/color]
        of[color=blue]
        > which one their looking at?
        >
        > "William F. Robertson, Jr." <wfrobertson@kp mg.com> wrote in message
        > news:OVO7hj%23P DHA.2160@TK2MSF TNGP11.phx.gbl. ..[color=green]
        > > 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[/color][/color]
        will[color=blue][color=green]
        > > look.
        > >
        > > But to answer you question...yes.
        > >
        > > HTH,
        > >
        > > bill
        > >
        > >
        > >
        > >
        > > "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
        > > news:eaQmNT#PDH A.1216@TK2MSFTN GP11.phx.gbl...[color=darkred]
        > > > I have a usercontrol that is basically a webapp-wide menu[/color][/color]
        > (dropdownlists,[color=green][color=darkred]
        > > > 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?
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        Working...