Control not maintaing viewState and PostBack not firing event.

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

  1. #1

    Default Control not maintaing viewState and PostBack not firing event.

    I created a nWeb Custom Control that inherits from WebControls.Panel
    and add a CheckBoxList to this control. I can't seem to get this
    control to maintain it's viewState. I don't think I need any additonal
    code since I'm using existing controls. Is this correct?

    In the past I've had to override LoadViewState and SaveViewState but
    that is when I have a more complex control.

    Also, I set AutoPostBack to true for the CheckBoxList control and now
    when I make a selecttion I get a postback put it does not seem to be
    firing the SelectedIndexChanged event. I put a breakpoint in the
    method that handles SelectedIndexChanged for that control but I never
    get to this line.

    Thanks,
    Don

    Don Guest

  2. Similar Questions and Discussions

    1. Firing user control event from parent control
      Hi, actually you don't need events. all you need is internal or public function exposed by your inner user control(UCSub). you can call that...
    2. Composite Control - Event not firing in child control
      Hello: I am experiencing an issue where I have a composite control (TestOuter) composed of more composite (TestInner) controls. When I am...
    3. Sort not firing PostBack event using Dynamic Columns
      I am having a problem with the DataGrid control and sorting, and have found it's realted to if you use dynamic columns or not. If I set the columns...
    4. Forcing Page Postback at END of event (while retaining viewstate)
      I have a page that reads values from an XML file to display to the user. The page also has a control panel that allows administrators to update the...
    5. Dynamic Control Event Not Firing Help
      In my ASP.NEt codebehind, I declare a public var for a DataGrid. Then in the TextChanged event handler for a TextBox, I create a <div> tag, stuff...
  3. #2

    Default RE: Control not maintaing viewState and PostBack not firing event.

    It sounds as though you may have a control in the page hierarchy that doesn't
    have an ID set so that your control cannot be found on postback due to a
    higher control that doesn't have an ID set being given a different ID on
    postback than before.

    Regards,

    mr fox.
    "Don" wrote:
    > I created a nWeb Custom Control that inherits from WebControls.Panel
    > and add a CheckBoxList to this control. I can't seem to get this
    > control to maintain it's viewState. I don't think I need any additonal
    > code since I'm using existing controls. Is this correct?
    >
    > In the past I've had to override LoadViewState and SaveViewState but
    > that is when I have a more complex control.
    >
    > Also, I set AutoPostBack to true for the CheckBoxList control and now
    > when I make a selecttion I get a postback put it does not seem to be
    > firing the SelectedIndexChanged event. I put a breakpoint in the
    > method that handles SelectedIndexChanged for that control but I never
    > get to this line.
    >
    > Thanks,
    > Don
    >
    >
    mr fox 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