how to get listbox value and text as well?

G

Guest

hello, my list box is generated by javascript and in my codebehing if i do a
Request.Form["lstbox"] i'll get a string to the listbox value e.g. "1,2,3,4,"
how can i get the text for the listbox as well?
any help would be greatly appriciated!
 
S

Shiva

You will only get the value part on postback. If you want the text as well,
you should have the item text also as part of each value (using a separator
may be) and extract it on the server side. However, if you do not have the
value attribute at all, then you will get the selected items' text on post
back.

hello, my list box is generated by javascript and in my codebehing if i do a
Request.Form["lstbox"] i'll get a string to the listbox value e.g.
"1,2,3,4,"
how can i get the text for the listbox as well?
any help would be greatly appriciated!
 

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

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top