Populating DropdownCombo

  • Thread starter Thread starter Vaj
  • Start date Start date
V

Vaj

Hi,

I've a combobox ,I'm populating that combo from my database using ,
DropCountry.DataSource=rsreader2;DropCountry.DataTextField="Country";DropCountry.DataValueField="idcntry";DropCountry.DataBind();

I'm storing ID in Datavalue field and it's country name in DataTextField for displaying.

How 'll i get the corresponding ID value when i select one Country?

Can anyone help me to solve this problem?.

thanks,

Vjay
 
Try combo.SelectedValue property

Hope this helps
Dan
Hi,

I've a combobox ,I'm populating that combo from my database using ,
DropCountry.DataSource=rsreader2;DropCountry.DataTextField="Country";DropCountry.DataValueField="idcntry";DropCountry.DataBind();

I'm storing ID in Datavalue field and it's country name in DataTextField for displaying.

How 'll i get the corresponding ID value when i select one Country?

Can anyone help me to solve this problem?.

thanks,

Vjay
 
Back
Top