NameValueCollection UrlCollection = Request.QueryString;
UrlCollection.Remove("Area");出现错误 System.NotSupportedException: 集合是只读的。我想移除集合中的某项 那该如何做啊?
UrlCollection.Remove("Area");出现错误 System.NotSupportedException: 集合是只读的。我想移除集合中的某项 那该如何做啊?
// 摘要:
// 获取 HTTP 查询字符串变量集合。
//
// 返回结果:
// System.Collections.Specialized.NameValueCollection,包含由客户端发送的查询字符串变量的集合。例如,如果请求
// URL 为 http://www.contoso.com/default.aspx?id=44,则 System.Web.HttpRequest.QueryString
// 的值为“id=44”。
public NameValueCollection QueryString { get; }就是request.querystring 返回的类型啊?如何移除这个集合中的项啊
用 remove方法 却报错而我 直接
NameValueCollection myCol = new NameValueCollection();
myCol.Remove("xxx");这样写却不会报错