ASP.NET MVC Url Route supporting (dot)

后端 未结 5 1689
野性不改
野性不改 2020-11-27 03:34

I hope that you can help me with the below problem.

I am using ASP.NET MVC 3 on IIS7 and would like my application to support username\'s with dots.

Example:

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-27 04:38

    Add a UrlRoutingHandler to the web.config. This requires your url to be a bit more specific however (f.e. /Users/john.lee). This forces every url starting with /Users to be treated as a MVC url:

        
            
              
      
    
    

提交回复
热议问题