471,316 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,316 software developers and data experts.

Always getting the first value from Drop Down List

This questions is pretty easy, but let me ask since I wasn't able to figure it out.

why I am always getting the first value from DropDownList when I have

ddlStates.SelectedItem.Value;

Autopostback = false;
EnableViewState = true;
Jul 18 '07 #1
2 1533
Plater
7,872 Expert 4TB
This is a web application yes?
Is anything else doing an autopostback that would cause it to reset?

But more likely you are populating the values in like form_load() somehow and they're being overwritten. (Like with a DataBind)
Jul 18 '07 #2
This is a web application yes?
Is anything else doing an autopostback that would cause it to reset?

But more likely you are populating the values in like form_load() somehow and they're being overwritten. (Like with a DataBind)
Actually I had ddl.SelectedIndex = 0 in my page_load event. I didn't realize that. Thanks anyways
Jul 18 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Ian Davies | last post: by
6 posts views Thread by JD | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.