View Single Post
  #5 (permalink)  
Old February 19th, 2012, 01:43 PM
irProject irProject is offline
Friend of Wrox
Points: 742, Level: 10
Points: 742, Level: 10 Points: 742, Level: 10 Points: 742, Level: 10
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Nov 2009
Location: Tehran, Iran
Posts: 156
Thanks: 13
Thanked 16 Times in 16 Posts
Smile it works

Hi there

I tried what you mentioned and there was no problem with selectedValue (as it should be). I guess that your CountryId's and SelectedIndex are similar and make you confused! try below code for test reasons:

HTML Code:
<asp:DropDownList ID="ddlCountry" runat="server" Width="255px" TabIndex="11"
DataSourceID="ds_Countries" 

DataTextField="CountryId"
DataValueField="CountryName" 

AppendDataBoundItems="True" AutoPostBack="True">
<asp:ListItem>Please Select Country</asp:ListItem>
</asp:DropDownList>
__________________
happy every time, happy every where

Reza Baiat