Get full query string in C# ASP.NET
Request.QueryString
returns you a collection of Key/Value pairs representing the Query String. Not a String. Don't think that would cause a Object Reference error though. The reason your getting that is because as Mauro pointed out in the comments. It's QueryString and not Querystring.
Try:
Request.QueryString.ToString();
or
<% string URL = Request.Url.AbsoluteUri System.Net.WebClient wc = new System.Net.WebClient(); string data = wc.DownloadString(URL); Response.Output.Write(data);%>
Same as your code but Request.Url.AbsoluteUri
will return the full path, including the query string.