当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > asp.net request.PathInfo实现的url重写

ASP.NET
Web服务器控件:LinkButton控件
Web服务器控件:ListBox控件
Web服务器控件:ListItem控件
Web服务器控件:Literal控件
Web服务器控件:Panel控件
Web服务器控件:PlaceHolder控件
Web服务器控件:RadioButton控件
Web服务器控件:RadioButtonList控件
Web服务器控件:BulletedList控件
Web服务器控件:Style控件
Web服务器控件:Table控件
Web服务器控件:TableCell控件
Web服务器控件:TableRow控件
Web服务器控件:TextBox控件
Web服务器控件:XML控件
Validation服务器控件:CompareValidator控件
Validation服务器控件:CustomValidator控件
Validation服务器控件:RangeValidator控件
Validation服务器控件:RegularExpressionValidator控件
Validation服务器控件:RequiredFieldValidator控件

ASP.NET 中的 asp.net request.PathInfo实现的url重写


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-11   浏览: 43 ::
收藏到网摘: n/a

最近对在开始研究url重写,对重写的原理以及重写之后引起的性能问题是研究的重点,研究过程中发现了一种轻便的“url重写方案” 这种方法在《技巧/诀窍:在ASP.NET中重写URL》这篇文章提到的。简单的说,大家都知道:
复制代码 代码如下:

http://www.ruanchen.com/"" src="/upload/tech/20091011/20091011144213_2b8a61594b1f4c4db0902a8a395ced93.gif" width=412 border=1>
大家看到可以取得id,而使用的方法也很简单:
Request.PathInfo可以取得url扩展名的附加信息,就是可以取得/520,但我们只要那个数字,那么就是
复制代码 代码如下:

Request.PathInfo.Substring(1)