selecteditem.value vs. selectedvalue

  • Thread starter Thread starter darrel
  • Start date Start date
D

darrel

what is the difference between these? I always end up typing 'selectedvalue'
only to have problems and then realize I meant to use selecteditem.value
(the value of the selected item).

When would one use the former (selectedValue)?

-Darrel
 
what is the difference between these? I always end up typing
'selectedvalue' only to have problems and then realize I meant to use
selecteditem.value (the value of the selected item).

When would one use the former (selectedValue)?


It just saves a step ; )
 
what is the difference between these? I always end up typing
It just saves a step ; )

So they are actually the same thing? Odd. I had problems with one but not
the other recently. I'll have to go back and figure out what the culprit
was...

-Darrel
 
SelectedValues returns the Value of the selecteditem or "" if there is none.

SelectedItem returns the selected item. SelectedItem.Value return the .Value
of the SelectedItem. SelectedItem.Value will throw an error if there is no
selected item, because SelectedItem will return null, and .Value of null
will throw the error.

-- bruce (sqlwork.com)
 
SelectedItem returns the selected item. SelectedItem.Value return the
..Value
of the SelectedItem. SelectedItem.Value will throw an error if there is no
selected item, because SelectedItem will return null, and .Value of null
will throw the error.

aha! That explains the issues I was having. Thanks for that clarification!

-Darrel
 
Back
Top