是否可以在不使用 的情况下获取 QueryString 值?或网址中的&?
我想要这样的:
http://www.colors.com/Red
string id = Request.QueryString["?"];
而不是以下内容:
http://www.colors.com/?ColorID=Red
string id = Request.QueryString["ColorID"];
最佳答案
没有。查询字符串由 ?
的出现定义。
您给出的示例会将用户重定向到一个目录。
关于c# - Request.QueryString 没有吗?或&可能吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8873291/