Field values are not stored in the viewstate. By design a web page post
field values to the server. The viewstate was created to store other values.
So IMO your controls are just reinitialized from postback values.
Double check your code. You likely forgot to initialize the values from the
db after a postback ( it's likely that usually you don't bind again on a
postback because the data are what you want to show but in this particular
case the postback change the current set of data you wan't to display so you
should bind again to your data).
--
Patrice
> Field values are not stored in the viewstate. By design a web page post
> field values to the server. The viewstate was created to store other
> values. So IMO your controls are just reinitialized from postback values.
yes. that's exactly what i'm seeing. what i'm trying to do is stop the asp
net engine from repopulating these fields based on the posted back data and
instead use the values i'm assigning as the dynamically created controls are
initialized. i modified my page so that when the user drop down list is
changed (causing a postback event) i capture the selected user to session
and then response.redirect back to the same page. then, within page_load i
get the selected user and call my routine to recreate the dynamic controls
with the appropriate values. this works fine. so, it's something in the
postback event i need to control, but how? if the solution is to rebind my
data, in which event handler should it go? in other words, which event would
fire after .net is done repopulating the form fields?
tks
> Double check your code. You likely forgot to initialize the values from
> the db after a postback ( it's likely that usually you don't bind again on
> a postback because the data are what you want to show but in this
> particular case the postback change the current set of data you wan't to
> display so you should bind again to your data).
> --
> Patrice
[quoted text clipped - 18 lines]
>>
>> tks