简体   繁体   English

ASP.NET 4使用Web表单和众多产品进行URL路由

[英]ASP.NET 4 URL routing with web forms and numerous products

We are about to start development of an e-commerce site that will lean heavily on the new .net 4 url routing see ScottGu's blog post . 我们即将开始开发一个电子商务网站,该网站将严重依赖新的.net 4 url​​路由, 请参阅ScottGu的博客文章 The potential problem I see is that we have 1000's of products to display and each one will have its own unique URL. 我看到的潜在问题是我们要展示1000种产品,每种产品都有自己独特的URL。 My question is this: Does anyone have experience registering the routes of 1000's of products in Application_Start? 我的问题是:有没有人有经验在Application_Start注册1000的产品路线? How does this effect performance? 这会影响性能如何? Memory usage? 内存使用情况? Other issues I'm not even aware of? 其他我甚至都不知道的问题?

Why wouldn't you route it like this image , where the product name is a slug? 为什么不像这张图片一样路由它,产品名称是slug?

Since the product is a slug, not part of the routed URL, and you can access which product was requested through the routing data ... 由于产品是slug,不是路由URL的一部分,您可以通过路由数据访问请求的产品...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM