SelectedValue - SelectedItem

G

Guest

what is a selected value and what is a selected item? I am constantly
guessing and all the information I have found says SelectedItem is the item
selected and SelectedValue is the value selected. These answers leave me
chasing my tail.

Thanks

nczimm
 
K

Karl Seguin

SelectedItem returns the ListItem object. SelectedValue simply returns the
string value. SelectedValue is the same as SelectedItem.Value. Also,
SelectedValue is read/writable, whereas SelectedItem is readonly. You can
safely use SelectedValue, unless there's a reason you need the entire
ListItem that was selected (99% of the time you only use the value).

Karl
 

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

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,832
Latest member
GlennSmall

Latest Threads

Top