I've got an asp.net page and I added a drop down box to it. When the user changes the selected index I want a 2nd control to either appear or not. I thought this would be straightforward, but it does not appear so.
In order to do this I do I really have to have AutoPostBack set to true? This means the page reloads each time the user moves through the drop down list! Worse than that though, in the Page_Load proc I have:
if (IsPostBack)
{
SubmitPageToTheDatabase();
}
So, each time the user changes the drop down list the page gets submitted! this is definitely not what I want to happen. What am I doing wrong?
In order to do this I do I really have to have AutoPostBack set to true? This means the page reloads each time the user moves through the drop down list! Worse than that though, in the Page_Load proc I have:
if (IsPostBack)
{
SubmitPageToTheDatabase();
}
So, each time the user changes the drop down list the page gets submitted! this is definitely not what I want to happen. What am I doing wrong?