Determine if custom control is being added dynamically?

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

  1. #1

    Default Determine if custom control is being added dynamically?

    Hi,

    Is it possible to determine in your custom control code if it is being added
    to the control hierarchy through page parsing or being added dynamically via
    code.

    Thanks

    Donal


    Donal McWeeney Guest

  2. Similar Questions and Discussions

    1. Managing ViewState of a dynamically created Custom Composite Server Control -(where the original is also dynamically created)
      Ok here's my scenario. I have a Custom Composite Server Control (CCSC) consisting of a TextBox, Button & Panel. (And some other code - which I...
    2. Dynamically adding a custom control
      Steven Im getting in a bit of a mess with this. What I want to end up with is a set of controls for editing / displaying fields on a webform. I...
    3. Handle Event of Dynamically Added User Control
      Hi There! How to handle the events of a dynamically added user control? e.g. I have following code... Dim myUserControl as Object =...
    4. How determine type of DataItem in custom control??
      Hello, i have a control inheriting from the DataRepeater control. It has a property which is the name of a Column/Property to run subtotals on from...
    5. How to find control dynamically added in the header
      Pls any body tell me how can i find the control added in the following way : Protected Overrides Sub OnItemDataBound(ByVal e As...
  3. #2

    Default Re: Determine if custom control is being added dynamically?

    You can check where it is in the Page's controls hierarchy? I usually use
    a PlaceHolder class to place my dynamically added controls in
    "Donal McWeeney" <macker@newsgroup.nospam> wrote in message
    news:OsUsBN%23nEHA.644@tk2msftngp13.phx.gbl...
    > Hi,
    >
    > Is it possible to determine in your custom control code if it is being
    > added to the control hierarchy through page parsing or being added
    > dynamically via code.
    >
    > Thanks
    >
    > Donal
    >

    Janaka Guest

  4. #3

    Default Re: Determine if custom control is being added dynamically?

    Thanks...

    "Janaka" <janakaf@hotmail.com> wrote in message
    news:OFV7FsKoEHA.3324@TK2MSFTNGP12.phx.gbl...
    > You can check where it is in the Page's controls hierarchy? I usually
    > use a PlaceHolder class to place my dynamically added controls in
    > "Donal McWeeney" <macker@newsgroup.nospam> wrote in message
    > news:OsUsBN%23nEHA.644@tk2msftngp13.phx.gbl...
    >> Hi,
    >>
    >> Is it possible to determine in your custom control code if it is being
    >> added to the control hierarchy through page parsing or being added
    >> dynamically via code.
    >>
    >> Thanks
    >>
    >> Donal
    >>
    >
    >

    Donal McWeeney 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