extension methods

There are 1 entries for the tag extension methods
HttpRequest QueryValue extension methods

Getting non string values from the querystring can be a chore if you need to read alot of values; parsing to the required type and ensuring the querystring value doesn't cause an exception ("adsf" cannot become an integer) can add alot of code to each page. So a long while ago I created a small helper class to do this for me, which I've now upgraded (after reading a blog entry by ScottH about TypeConverters) to use generics and extension methods. I've also included methods to get a value from the Request.Form property. using System; using System.Web; using System.ComponentModel; namespace LukeSmith.Web { ...

posted @ Thursday, July 31, 2008 8:07 PM | Feedback (2)