How to pass special characters so ASP.NET MVC can handle correctly query string data?

前端 未结 3 1380
陌清茗
陌清茗 2020-12-29 07:58

I am using a route like this one:

routes.MapRoute(\"Invoice-New-NewCustomer\",
    \"Invoice/New/Customer/New/{*name}\",
    new { controller = \"Customer\",         


        
3条回答
  •  情深已故
    2020-12-29 08:36

    URL Encoding! Change the link so that it encodes special characters.

    Server.URLencode(strURL)
    

    C# will become "c%23".

提交回复
热议问题