Dropdown selectedindexchanged event firing when submit button clic

G

Guest

Hi,

I have a web control button that I use for submitting a form, for some
reason this causes a dropdownlist web control I have in a panel at the top of
the form to execute it's selected index changed event even though on this
postback that value hasn't been changed. I believe viewstate and validation
are causing this value to be considered changed somehow. When the page is
first loaded the only control that causes postback is this dropdown, then on
rerendering the page, it displays another panel that goes with the value
selected in the dropdown.

Any ideas?

Please help thanks.
 
B

Brock Allen

Is the DropDownList's ViewState disabled? If so, then it can cause odd side-effects
if you're relying upon it's eventing behavior. IOW, if you are using the
SelectedindexChanged event, you can't disable viewstate.
 
G

Guest

Um like a moron, I forgot to enable viewstate for the panel that the dropdown
is contained in. lol
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top