Dropdownlist text

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

How do I get the selected text from a dropdownlist?

I know I can get the value using selectedValue and there is selectedIndex to
get the row, but how do I get the text that is displayed?

I tried ddl.text and that doesn't work.

Thanks,

Tom
 
Hi Tom,

Try this?

Response.Write(DropDownList1.SelectedItem.Text)
 
Ken Cox said:
Hi Tom,

Try this?

Response.Write(DropDownList1.SelectedItem.Text)

That was it. I thought I tried that, but obviously not.

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top