G
Guest
I seem to be having a problem or am just not understanding something with
WebParts. I am losing ViewState when I add a control to a ZoneTemplate. For
example, if I have a Label and set the Label's Text property to "bar" only on
the first page load(i.e. !IsPostBack), and then click a button or something,
it works fine. Viewstate has retained the value "bar". However, when I add
the Label to a WebPartZone and repeat the same experiment, I lose the value
"bar". I have tried the same experiment with a GridView (about 50 rows with
5 columns of data) and the page size differs by about 2K by either placing
the grid inside or outside (outside being larger) the WebPartZone. The
strange thing with the GridView experiment is that it kept all of the rows
and columns, but the cell data was gone! This, to me, looks like the
GridView's ViewState was maintained, but not its child controls. What is
going on here?
Thank you in advance.
WebParts. I am losing ViewState when I add a control to a ZoneTemplate. For
example, if I have a Label and set the Label's Text property to "bar" only on
the first page load(i.e. !IsPostBack), and then click a button or something,
it works fine. Viewstate has retained the value "bar". However, when I add
the Label to a WebPartZone and repeat the same experiment, I lose the value
"bar". I have tried the same experiment with a GridView (about 50 rows with
5 columns of data) and the page size differs by about 2K by either placing
the grid inside or outside (outside being larger) the WebPartZone. The
strange thing with the GridView experiment is that it kept all of the rows
and columns, but the cell data was gone! This, to me, looks like the
GridView's ViewState was maintained, but not its child controls. What is
going on here?
Thank you in advance.