Child Controls => Postback? => null?

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

  1. #1

    Default Child Controls => Postback? => null?

    Hi

    there were a few postings earlier, including mine
    regarding this. It looks as if when a dynamic child
    control causes a postback, its handler never gets called,
    and the control is null. This seems wierd. What about
    bubbing events to parents in DataGrid - if events are
    never even triggered? Can somebody explain this please.

    Thank you
    Sergey
    szabelin Guest

  2. Similar Questions and Discussions

    1. Control.Controls bug? Control's child controls missing at the run time.
      Hello, ..NET 1.1/VB.NET: I have a custom web control Public Class DatePicker Inherits Control Implements INamingContainer
    2. HELP! Child controls of child controls not visible to web app
      I have a custom server control. It's a TabControl. It's really cool, actually. Looks just like a standard VB6 TabControl. It lets you set the...
    3. Child window property window.opener null after postback
      I have an webform from which I open a child window to display a calendar. When a date is selected in the calendar window it attempts to set the...
    4. Accessing values of child controls after postback
      Hi! I have a placeholder to which i add a Table with 2 columns. In one of the columns are textboxes with an unique ID (box1, box2, .... boxN)....
    5. user controls: dynamiclly added child controls dont survive post back ?
      hi, i have some strange behaviour: i've created a web user control that add's some child controls (e.g: textbox, image buttons) to its control...
  3. #2

    Default Re: Child Controls => Postback? => null?

    "szabelin" <szabelin@szabelin> wrote in message
    news:05cf01c35591$df0ebdd0$a501280a@phx.gbl...
    > Hi
    >
    > there were a few postings earlier, including mine
    > regarding this. It looks as if when a dynamic child
    > control causes a postback, its handler never gets called,
    > and the control is null. This seems wierd. What about
    > bubbing events to parents in DataGrid - if events are
    > never even triggered? Can somebody explain this please.

    I'm guessing that you're not recreating your dynamic
    child controls on postback. Only when they are recreated
    the handler can be called.

    If this is the case, the way to go is:
    1) recreate the dynamic child controls in the same way
    (same ID's) as before the postback
    2) handle the postback
    3) at the end of the postback handler, if necessary,
    destroy the child controls again and create other ones.

    --

    Jos Branders


    Jos 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