G
Guadala Harry
I have a simple user control (see below) that has EnableViewState="true". I
place it on an ASPX page at runtime using a PlaceHolder - which also has
EnableViewState="true".
After a postback, the aspx page renders back to the client, but the user
control is not on the rendered page. Why? I thought ViewState was supposed
to keep things intact between postbacks. FWIW: during the postback the code
does nothing with respect to the user control or to the PlaceHolder within
which it resides. Additonally, the hosting aspx page has a few WebControls
(TextBox, DropDownLists, etc..) and they retain their respective values
between postbacks as expected. What's the deal with the user control?
<%@ Control EnableViewState="true" %>
<table>
<tr>
<td>
This text is in a table in the user control
</td>
</tr>
</table>
Thanks!
-GH
place it on an ASPX page at runtime using a PlaceHolder - which also has
EnableViewState="true".
After a postback, the aspx page renders back to the client, but the user
control is not on the rendered page. Why? I thought ViewState was supposed
to keep things intact between postbacks. FWIW: during the postback the code
does nothing with respect to the user control or to the PlaceHolder within
which it resides. Additonally, the hosting aspx page has a few WebControls
(TextBox, DropDownLists, etc..) and they retain their respective values
between postbacks as expected. What's the deal with the user control?
<%@ Control EnableViewState="true" %>
<table>
<tr>
<td>
This text is in a table in the user control
</td>
</tr>
</table>
Thanks!
-GH