核心提示:C#使用Request获取网址传递参数时显示如下错误:string other = HttpContext.Current.Request.ServerVariables('QUERY_STRING'...
C#使用Request获取网址传递参数时显示如下错误:
string other = HttpContext.Current.Request.ServerVariables("QUERY_STRING");
结果报错:Request.QueryString 不能像使用方法那样使用不可调用
解决方法:将圆括号“()”改为方括号“[]"
string other = HttpContext.Current.Request.ServerVariables["QUERY_STRING"];