Help: Usercontrol - different behaviors based on parent

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default 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?


    VB Programmer Guest

  2. Similar Questions and Discussions

    1. Can we use a usercontrol inside a usercontrol
      hi group can we use a usercontrol inside a usercontrol. i mean can we use <%Register tagprefix..... src=....ascx%> in an ascx file. thanks in...
    2. Usercontrol interacting with it's parent page?
      Hi all, Is it possible for a usercontrol to call a public method of a page it is contained within? If so, how? Regards John.
    3. Event not firing in usercontrol inside usercontrol
      I'm stumped on this problem. I've created a user control that dynamically creates 5 linkbuttons in the CreateChildControls method. Each of these...
    4. #24735 [NEW]: call_user_func on parent method does not use parent private property
      From: tater at potatoe dot com Operating system: OS X 10.2 PHP version: 5CVS-2003-07-21 (dev) PHP Bug Type: Zend Engine 2...
    5. Use LoadControl to load a usercontrol but the webcontrol in the usercontrol can not AutoPostBack
      a uscontrol test.ascx have a dropdownlist web control the dropdownlist's AutoPostBack property is set "true" but when i use...
  3. #2

    Default 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#PDHA.1216@TK2MSFTNGP11.phx.gbl...
    > 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. Guest

  4. #3

    Default 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." <wfrobertson@kpmg.com> wrote in message
    news:OVO7hj%23PDHA.2160@TK2MSFTNGP11.phx.gbl...
    > 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#PDHA.1216@TK2MSFTNGP11.phx.gbl...
    > > 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 Guest

  5. #4

    Default 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$PDHA.560@TK2MSFTNGP10.phx.gbl...
    > Are you saying to use a public var, like CurrentParentForm, to keep track
    of
    > which one their looking at?
    >
    > "William F. Robertson, Jr." <wfrobertson@kpmg.com> wrote in message
    > news:OVO7hj%23PDHA.2160@TK2MSFTNGP11.phx.gbl...
    > > 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#PDHA.1216@TK2MSFTNGP11.phx.gbl...
    > > > 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. Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139