ASP.Net DropDownList SelectedIndex Is Not Changing
> In some situation, the dropdownlist selected Item or Index will be always the first Item.
> We can get this Issue when we bind the dropdownlist after the button click postback.
> This is because, On Asp.Net Life Cycle, the Postback Event comes after the PageLoad Event.
> And In each Page Load, the Dropdownlist will get refreshed.
> Hence after Page Load, on Postback Event, the Selected Item will be the first one.
How To Resolve This Issue..?
> In order to resolve this Issue, we have prevent loading the
dropdownlist on postback.
> We have to use
IsPostback property in
Asp.Net for this purpose as shown below.
If(! IsPostBack)
{
     Bind your dropdownlist here.
}
>
By this way we can resolve this issue.
Watch Video of this Content on Video Streaming