ASP.NET 4.0 URL Rewriting: How to deal with the IDs
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have just started adding the new .NET 4.0 URL Rewriting into my project. I have a question. Let's say I have a Article.aspx that displays, well, articles. I made a route for it in the Global.asax: routes.MapPageRoute("article-browse", "article/{id}", "~/Article.aspx"); So the link consists of the article's id which is, obviously, not a very nice, nor SEO friendly link. I would like to display the Article's title in the link, instead of the ID. Do I have to pass the whole title in the parameter (instead of the id) and then make a SQL query