使用Asp.net类文件获取查询字符串计数 [英] using Asp.net Class file getting the query string count
本文介绍了使用Asp.net类文件获取查询字符串计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
请帮我任何身体。
使用asp.net课程file如何获取查询字符串的数量。
实际上我想在类文件中使用以下代码。
任何机构都有想法请发表评论。如果可能还要导入任何命名空间
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
for (int i = 0; i < Request.QueryString.Count; i++)
{
string qs="";
qs = Request.QueryString[i].ToString();
}
推荐答案
尝试以下方法:
Hi,
Try the following:
for (int i = 0; i < HttpContext.Current.Request.QueryString.Count; i++)
{
string qs="";
qs = HttpContext.Current.Request.QueryString[i].ToString();
}
希望有所帮助
Hope it helps
这篇关于使用Asp.net类文件获取查询字符串计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文