Click here to Skip to main content
15,884,472 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

Please help me any body.

using a asp.net class file how to get the count of query string.

Actually i want to use the below code in class file.

Any body have an idea please post a comment. if possible to import any namespaces also

C#
for (int i = 0; i < Request.QueryString.Count; i++)
           {
               string qs="";
               qs = Request.QueryString[i].ToString();
               
           }
Posted

1 solution

Hi,

Try the following:
C#
for (int i = 0; i < HttpContext.Current.Request.QueryString.Count; i++)
{
    string qs="";
    qs = HttpContext.Current.Request.QueryString[i].ToString();

}


Hope it helps
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900