ASP.NET MVC Routing - add .html extension to routes

前端 未结 4 673
别那么骄傲
别那么骄傲 2020-11-28 12:56

i am pretty new to MVC and Routing and i was asked to modify an app to use diffrent url\'s. a task that is a bit over me since i have no experience.

ok, lets talk a

4条回答
  •  死守一世寂寞
    2020-11-28 13:13

    Just add this section to Web.config, and all requests to the route/{*pathInfo} will be handled by the specified handler, even when there are dots in pathInfo. (taken from ServiceStack MVC Host Web.config example and this answer https://stackoverflow.com/a/12151501/801189)

      
        
          
            
          
        
        
        
          
          
          
            
          
        
      
    

提交回复
热议问题