开发者

how to handle Asp.net MVC Routing along with asp.net webform routing

开发者 https://www.devze.com 2023-01-15 01:36 出处:网络
How to handle asp.net mvc routing along with asp.net webform routing. I have merged my mvc app into开发者_运维知识库 my existing web application.

How to handle asp.net mvc routing along with asp.net webform routing. I have merged my mvc app into开发者_运维知识库 my existing web application.

In my web application i have implement routing as below:

routes.Add("View Product Details",
  new Route("Product/{City}/{Manufacturer}/{Name}/{ProductID}/{*ProductType}"));

Similarly i have implemented routing in mvc as below

routes.MapRoute("Product Details",
         "Product/{City}/{Manufacturer}/{Name}/{ProductID}/{ProductType}",
         new
         {
             controller = "Home",
             action = "ProductDetails",
             City= UrlParameter.Optional,
             Manufacturer= UrlParameter.Optional,
             Name= UrlParameter.Optional,
             ProductID= UrlParameter.Optional,
             ProductType= UrlParameter.Optional
         });

Please help me on this, as both page have different functionality and design.

How to handle both pages, as one is custom web form while other is asp.net mvc view?

0

精彩评论

暂无评论...
验证码 换一张
取 消