DropDownList.SelectedValue returns UpperCase string.

I've noticed that DropDownList.SelectedValue returns Upper Case string, even if Items in ListItemCollection are shown in mixed case in debugger and in html.
I tried to confirm it using Reflector , but didn't find particular code to call ToUpper.

Is it only my application or .Net framework(I am using 2.0) ?

Anyway, it is a good practice to call ToUpper() if you want to compare  DropDownList.SelectedValue with other strings.

 

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
posted @ Monday, December 10, 2007 4:39 PM
Print

Comments on this entry:

# re: DropDownList.SelectedValue returns UpperCase string.

Left by mehrdad at 2/11/2010 10:31 PM
Gravatar
with a lot of thanls

Your comment:



(not displayed)


 
 
 
 
 

Live Comment Preview:

 
«February»
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910