Blog Archives

Best way to Parse Query String value in Asp.Net

Best way to parse query string value in Asp.Net //Use it string cityCode = Request.QueryString.GetValue<string>(“City”); //Extension method public static T GetValue<T>(this NameValueCollection collection, string key)         {             if (collection == null)             {                 throw new ArgumentNullException(“collection”);             }

Tagged with: ,
Posted in .Net, Asp.Net, C#
Top Rated

Error: Please make sure the Twitter account is public.

Blog Stats
  • 29,782 hits