Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > DropDownList SelectedValue property changed behaviour in .NET 3.5

Reply
Thread Tools

DropDownList SelectedValue property changed behaviour in .NET 3.5

 
 
Slavan
Guest
Posts: n/a
 
      02-05-2009
Hello,

We just discovered a bug in our application that was initially created
in .NET 1.1 and later migrated to 2.0, after installing .NET 3.5 with
all latest service packs.
Here's the problem:

..NET 1.1/2.0 Behaviour
When you do something like this, first time you load page

ddlSomeDropDown.SelectedValue = "Non existent value" // Does not do
anything, keeps selected value empty string

After postback, the same line has same behaviour, it doesn't do
anything.

Now after installing .NET 3.5 and all latest service packs:
First time you load a page:

ddlSomeDropDownList.SelectedValue = "Non existent value" // Does not
do anything, keeps selected value empty string

After postback same line throws ArgumentOutOfRangeException.

I tried this in debugger with 1.1 and 3.5.

Documentation says it should throw this exception for all versions
of .NET, but it looks like they fixed it only in one of the latest
service packs. Our application have lots of places with this kind of
code, and we need to fix it everywhere. I'm not saying that Microsoft
should not fix bugs in their frameworks, but they should at least say
what they fixed that can cause side effects.
Also, I'm not sure if there were any other fixes that may cause side
effects. If anyone knows of a document of fixes that may cause side
effects, please let me know.

Thanks.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get SelectedValue of DropDownList in User Control in WebForm gu4y ASP .Net 4 01-13-2010 04:27 AM
Data Binding Problem in DropDownList Control SelectedValue to Table text field Tom Jorgenson ASP .Net 3 03-09-2007 10:42 AM
how to override DropDownList.SelectedValue property Abraham Andres Luna ASP .Net Web Controls 2 11-10-2005 06:57 PM
Dropdownlist.SelectedValue ISSUE Sudhir ASP .Net 1 02-26-2004 06:46 PM
DropDownList.SelectedValue not changing Jesse ASP .Net 3 07-24-2003 08:48 PM



Advertisments