ASP.NET MVC routing and static data (ie. images, scripts, etc)

前端 未结 3 1618
粉色の甜心
粉色の甜心 2021-01-05 14:14

If I have a request for a resource in my ASP.NET MVC1 (or 2) web app for a static resource, say ... an image or a javascript file or a css file ... does the .NET framework t

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-05 14:33

    By default the routing engine will ignore route maps for all files that exist physically on the server. In short, you need to do nothing for a MVC app to link to static files.

提交回复
热议问题