2016-04-29 52 views
0

如何ASP.NET路由可以不使用MVC路由在本地asp.net(不Asp.NET MVC)

作为一个例子来实现,这是我 本地主机 http://localhost/

和我有user.aspx

http://localhost/user.aspx

我怎么可以得到如下的URL路由到不同的功能在这user.aspx page?

http://localhost/user/example1

http://localhost/user/example1/setting

http://localhost/user/example1/setting/changeImage

http://localhost/user/example1/setting/enableView

http://localhost/user/example1/security

http://localhost/user/example/message/view

http://localhost/user/example/message/send

的重要问题,当用户请求该路径 http://localhost/user/example/message/viewhttp://localhost/user/example/message/send 我怎么可以显示的形式来看,或发送

+0

这是一个mvc应用程序吗?你标记了asp.net-mvc – Shyju

回答

0

很长一段时间后,我尝试过同样使用RouteTable和IIS的URLRewriterExtension。我写了一篇关于它的博客文章here

您需要一张路由表来注册路由。自定义路由处理程序,它将根据URL上的值返回实际页面。

您还可以从MSDN Code下载工作示例。