top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

SelectedValue vs SelectedItem.Value

+2 votes
395 views

Is SelectedValue just as same as SelectedItem.Value ? Which one performs better?

posted Mar 27, 2014 by Khusboo

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote
 
Best answer

SelectedValues returns the Value of the selecteditem or NULL if there is none.SelectedItem returns the selected item. SelectedItem.Value return the .Value of the SelectedItem.the main difference between these two properties is that the SelectedValue has a setter also, since SelectedItem doesn’t. Advantage of SelectedValue is when using Binding expressions.

answer Mar 27, 2014 by Pavan P Naik
...