Posted by : Sudhir Chekuri Thursday, 24 July 2014

to get selected value from the dropdown list to use it in your C# code using the below code

int i= Convert.ToInt32(DDLCity.SelectedValue);

In my example the value is a number and i want to store it in int variable.

To display text selected in dropdownlist in asp.net label i used the below C# code

LblCity.Text= DDLCity.SelectedItem.Text;


Leave a Reply

Subscribe to Posts | Subscribe to Comments

Followers

Total Pageviews

Powered by Blogger.

- Copyright © 2013 DevStudent - Metrominimalist - Powered by Blogger - Designed by Johanes Djogan -