Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.






Avoiding exceptions using list controls

Avoiding excpetions is always a good practice because exceptions can hurt as when thay occure. They may cause also hard performance loss. Assigning selected value to list controls is one candidate for ArgumentOutOfRange exceptions. Often this problem is solved using unhandled exception:


NB! This blog is moved to

Click here to go to article


gt1329a said:

It would be interesting though, to see the actual performance difference between handling the occasional exception and executing FindByValue on every single operation.

# July 19, 2008 8:57 AM

DigiMortal said:

Exceptions may be much more ressource eager than those FindByValue calls. Normally you don't have long dropdownlists by example.

# July 19, 2008 11:27 AM

Karl Heinz Brehme Arredondo said:

Very elegant solution, using correclty the concepts of .NET. Thanks.

# January 11, 2010 10:13 PM