Click here to Skip to main content
15,914,225 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
Hi all,
Am binding a dropdown list using jquery.
For your reference Request.Form[dropDist.UniqueID] Using this we can get selected value of dropdown list.but is there any tricky way to get dropdown selected text in c#.
Posted
Comments
SRS(The Coder) 27-Jun-14 8:49am    
you can simply put the selected value to a Hidden field and you can be able to get it on sever side.

1 solution

try to make your clientside code like below

ASP.NET
<asp:listitem value="India" text="India" xmlns:asp="#unknown"></asp:listitem>
(static here)or(/You can bind it with database values.)

In COde:
C#
Idofdropdown.SelectedItem.Text;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900