I tried that but it returns something that looks like this:
"/bscore/topmovers/_hpc/_1/016305.htmNRMODE=Published&NRORIGINALURL=%2fbscore %2ftopmovers%2fdefault.htm&NRNODEGUID=%7b428F5151-FE96-49B9-9178-8F1A9D59A316%7d&NRCACHEHINT=ModifyLoggedIn"
I am afraid this is not the right URL. I am not much of an expert, but the
..htm is repeated over several times there. I don't fully understand the %
signs neither, but I guess that relates to the path in my pc.
I tried this:
// Load NameValueCollection object.
NameValueCollection coll = Request.QueryString;
// Get names of all keys into a string array.
string[] keyArray = coll.AllKeys;
for (int i = 0; i < keyArray.Length; i++)
{
redirectTo += keyArray[i] + "=";
string[] valueArray = coll.GetValues(keyArray[i]);
for (int j = 0; j < valueArray.Length; j++)
{
redirectTo += valueArray[j];
}
}
But the result is pretty much the same.
"William F. Robertson, Jr." wrote:
Request.QueryString.ToString() will return all of them.
bill
"hecsan07" <he******@hotmail.com> wrote in message
news:FE**********************************@microsof t.com... I am a newbie in .NET. I am trying to collect the query string and paste
it to the new url. The problem is I am not sure with the particular names of
the query string elements are. How can I iterate through the QueryString
collection and copy the values to the URL?
Please help me with some code examples.
HS