Request.RawUrl 属性的应用收
分类:首页
标签Tags:request,rawurl,属性,应用,原始,url,定义,信息,部分,字符串,http,www,contoso,com,articles,recent,aspx,包括
原始 URL 定义为 URL 中域信息之后的部分。在 URL 字符串 http://www.contoso.com/articles/recent.aspx 中,原始 URL 为 /articles/recent.aspx。原始 URL 包括查询字符串(如果存在)。
实现代码如下:
if (Request.RawUrl.ToLowerInvariant().Contains("/category/"))
{
DisplayCategories();
}
用来对字符串分析,有选择的导向。
以上就是【Request.RawUrl 属性的应用收】的全部内容了,欢迎留言评论进行交流!