public string GetQueryString()
{
StringBuilder sb = new StringBuilder();
if (QueryString.Count > 0)
{
bool first = true;
for (int i = 0; i < QueryString.Count; i++)
{
string key = QueryString.Keys[i];
key = string.IsNullOrEmpty(key) ? null : HttpUtility.UrlEncodeUnicode(key) + "=";
foreach (string value in QueryString.GetValues(i))
if (value != null)
{
if (first) { sb.Append('?'); first = false; } else sb.Append('&');
sb.Append(key);
sb.Append(HttpUtility.UrlEncodeUnicode(value));
}
}
}
return sb.ToString();
}