Hi.. I've a problem about ViewState.

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

  1. #1

    Default Hi.. I've a problem about ViewState.

    Hi..

    My problem is that the ViewState of UserControl is not
    consisted when the UserControl is dynamically loaded at
    PreRender Event.

    That is, A UserControl is dynamically loaded at PreRender
    Event of a WebForm. Then, a server control in the
    UserControl fires post-back event and at this time the
    UserControl is dynamically loaded at Load Event of the
    Page. But the ViewState of the loaded UserControl is
    completely clear.

    Is there any way to consist the ViewState even though
    UserControl is loaded at PreRender Event?
    zimzion Guest

  2. Similar Questions and Discussions

    1. Failed to load viewstate. The control tree into which viewstate...
      Hi to all, I have a webform.aspx and inside i have a dropdown list with autopostback and a place holder... Depending of the selected index...
    2. ViewState problem
      I am having a performance problem with a datagrid control that has a large viewstate due to several columns containing very long href's in the...
    3. DataGrid Viewstate problem
      Hi, to all.. I have 2 web controls (MyDataGrid.cs, MyCalendar.cs The first inherits from calendar, and i have implemented the event...
    4. Sorting Problem with Viewstate
      I did my first DataGrid with sorting. Problem I have is viewstate has to be on for it to work, even though i am passing a dataview and re-binding...
    5. help ViewState problem
      Hi, I have a datalist control that I use a UserControl for the header template. It has a couple of text and selects to do filtering located in the...
  3. #2

    Default Re: Hi.. I've a problem about ViewState.

    ZimZion:

    If I read your Q correctly: any changes to ViewState made after PreRender
    are not saved. You will have to override the LoadViewState event procedure
    to gain access to the ViewState field after the postback.

    HTH
    --
    Elliot M. Rodriguez, MCSD
    *** It would take 227 cans of Mountain Dew to kill me***


    "zimzion" <zimzion@daum.net> wrote in message
    news:0a8501c34b7a$cd6b9920$a101280a@phx.gbl...
    > Hi..
    >
    > My problem is that the ViewState of UserControl is not
    > consisted when the UserControl is dynamically loaded at
    > PreRender Event.
    >
    > That is, A UserControl is dynamically loaded at PreRender
    > Event of a WebForm. Then, a server control in the
    > UserControl fires post-back event and at this time the
    > UserControl is dynamically loaded at Load Event of the
    > Page. But the ViewState of the loaded UserControl is
    > completely clear.
    >
    > Is there any way to consist the ViewState even though
    > UserControl is loaded at PreRender Event?

    Elliot Rodriguez 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