I tried that but it returns something that looks like this:
"/bscore/topmovers/_hpc/_1/016305.htmNRMOD E=Published&NRO RIGINALURL=%2fb score%2ftopmove rs%2fdefault.ht m&NRNODEGUID=%7 b428F5151-FE96-49B9-9178-8F1A9D59A316%7d &NRCACHEHINT=Mo difyLoggedIn"
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 NameValueCollec tion object.
NameValueCollec tion coll = Request.QuerySt ring;
// 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.Leng th; j++)
{
redirectTo += valueArray[j];
}
}
But the result is pretty much the same.
"William F. Robertson, Jr." wrote:
Request.QuerySt ring.ToString() will return all of them.
bill
"hecsan07" <he******@hotma il.com> wrote in message
news:FE******** *************** ***********@mic rosoft.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