Geeks With Blogs

News My Blog has been MOVED to https://mfreidge.wordpress.com
Michael Freidgeim's OLD Blog My Blog has been MOVED to https://mfreidge.wordpress.com

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.

 

Posted on Monday, December 10, 2007 4:39 PM ASP.NET | Back to top


Comments on this post: DropDownList.SelectedValue returns UpperCase string.

# re: DropDownList.SelectedValue returns UpperCase string.
Requesting Gravatar...
with a lot of thanls
Left by mehrdad on Feb 11, 2010 10:31 PM

Your comment:
 (will show your gravatar)


Copyright © Michael Freidgeim | Powered by: GeeksWithBlogs.net