Using a colon (:) in a url with ASP.NET/IIS

前端 未结 8 2334
醉话见心
醉话见心 2020-12-05 19:14

I\'m implementing a custom controller in ASP.NET MVC and really want to be able to use a colon in the urls, so that I can identify class/column names and their valu

8条回答
  •  悲哀的现实
    2020-12-05 19:49

    I suggest you rethink what you want to do. Use pathing to indicate context and hide your class and field names, mapping particular contexts within your URL paths to class names and fields. If you need to indicate a user, for example, build your URL layout like example.com/users/chaiguy rather than example.com/user:chaiguy.

提交回复
热议问题