Posted By

jonjoneshomegmailcom on 10/22/10


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Namevaluecolleciton To Querystring

 / Published in: C#

  1. private string JoinNvcToQs(NameValueCollection qs)
  2. {
  3. return string.Join("&", Array.ConvertAll(qs.AllKeys, key => string.Format("{0}={1}", HttpUtility.UrlEncode(key), HttpUtility.UrlEncode(qs[key]))));
  4. }

Report this snippet  

You need to login to post a comment.