ASP.Net 2.0 DropDownList Selected Not Working...

D

den 2005

Hi everybody,

I populate the dropdownlist control dynamically and when I am about to
get the value of selected item in the dropdownlist I always get the first
one, when I try to set the autopostback to true, no matter what I select in
the dropdownlist it goes back to first selection. Is there anyone knows how I
could solve this? This never happens when I am using asp.net 1.0 and 1.1.

This is very strange...

den2005
 
R

ReyN

The DropDownList must be populated only on the initial page load, if
not the list will behave just like you pointed out.

void Page_Load ( ) {
if ( ! IsPostBack ) {
// bind dropdownlist here
}
}
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top