Make sure you are not accidentally re-initializing your controls. All
controls have viewstate to maintain their values, and therefore in your
Page_Load event you need to make sure you only initialize your drop-downs
when the page is first being requested via HTTP GET request and not during an
HTTP POST request.
inside Page_Load:
public void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
//Initialize drop downs here
}
}
"mo" wrote:
> Hi,
>
> I have a set of Dynamic DropDownLists with AutoPostback. the problem I
> have is that when I select the dropdown and the page refreshes the old
> values in the text boxes disappear. Is there a way to preserve the
> values?
>
> Thanks,
> Mo
>
|