I\'m curious what everyone does for handling/abstracting the QueryString in ASP.NET. In some of our web apps I see a lot of this all over the site:
int val = 0;
Write some sort of a helper method (library) to handle it...
public static void GetInt(this NameValueCollection nvCol, string key, out int keyValue, int defaultValue)
{
if (string.IsNullOrEmpty(nvCol[key]) || !int.TryParse(nvCol[key], out keyValue))
keyValue = defaultValue;
}
Or something along those lines...