How do I enable special characters in MVC routing?

前端 未结 2 909
星月不相逢
星月不相逢 2020-12-07 01:42

I\'m using asp.net MVC 4.

These are my routes:

        routes.MapRoute(
         name: \"Default\",
         url: \"{controller}/{action}/{id}\"
             


        
2条回答
  •  时光说笑
    2020-12-07 02:16

    The answer did not work for me. I had to use:

    [ValidateInput(false)]
    public ActionResult Index...
    

    Hope this helps others.

提交回复
热议问题