views:

59

answers:

2

How to remove a textbox and put the dropdown box in asp.net

And the value that is used before in textbox, now it should take from dropdown box

A: 

You can use select tag for this. And can get the selected value in C# using the following code

Suppose cmb is the id of your dropdown box, then

cmb.Items[ cmb.SelectedIndex ].Value

can fetch the value selected in your drop down box and

cmb.Items[ cmb.SelectedIndex ].Text

can fetch the text selected

rahul
A: 

easiest way is to use jquery and jquery.jeditable plugin with it.

TheVillageIdiot