Can a user control be requested dynamically?

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

  1. #1

    Default Re: Can a user control be requested dynamically?

    You can load a control dynamically at runtime using the LoadControl method.
    Here's more info:
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuitemplatecontrolclassloadcontroltop ic.asp[/url]

    --
    I hope this helps,
    Steve C. Orr, MCSD
    [url]http://Steve.Orr.net[/url]


    "charles" <charles@synthigence.com> wrote in message
    news:%237Zzco9SDHA.2316@tk2msftngp13.phx.gbl...
    > Anybody know if it's possible request an ascx control dynaically?
    > I would like to be able to have several ascx files and determine which
    one's
    > exist on the website and display them at runtime.
    >
    > It seems that the @register directive is not dynamic (and the include
    > directive as well).
    >
    > Any ideas?
    >
    > thanks
    > charles
    >
    >

    Steve C. Orr, MCSD Guest

  2. Similar Questions and Discussions

    1. Dynamically Adding User Control with Child User Control
      I have a user control that has a child user control. If I drag this onto the page, it appears and functions normally. If I attempt to add the...
    2. How do I dynamically add a user control to a web page?
      I have a user control which I created that does not work when I add it dynamically to a web page. My code looks like this. For x = 0 to max...
    3. Dynamically loading user control
      Hi I am adding a user control to an aspx page dynamically. This user control has a link button. Hence I have to enclose it in a form tag with...
    4. Hiding and Showing User Control Dynamically
      Hey guys, I created a little user control that is basically a table with a login and password field. I have this control on all my pages, but I...
    5. need help with dynamically created user control
      i have a dynamically created user control which contains a non-dynamically created ASP.Net button. When the button is clicked, the event is not...
  3. #2

    Default Re: Can a user control be requested dynamically?

    Excellent! That's exactly what I needed.
    thanks
    charles

    "Steve C. Orr, MCSD" <Steve@Orr.net> wrote in message
    news:en$ip99SDHA.1552@TK2MSFTNGP10.phx.gbl...
    > You can load a control dynamically at runtime using the LoadControl
    method.
    > Here's more info:
    >
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemwebuitemplatecontrolclassloadcontroltop ic.asp[/url]
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD
    > [url]http://Steve.Orr.net[/url]
    >
    >
    > "charles" <charles@synthigence.com> wrote in message
    > news:%237Zzco9SDHA.2316@tk2msftngp13.phx.gbl...
    > > Anybody know if it's possible request an ascx control dynaically?
    > > I would like to be able to have several ascx files and determine which
    > one's
    > > exist on the website and display them at runtime.
    > >
    > > It seems that the @register directive is not dynamic (and the include
    > > directive as well).
    > >
    > > Any ideas?
    > >
    > > thanks
    > > charles
    > >
    > >
    >
    >

    charles 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