How can I use runat=“server” on a script tag in asp.Net

后端 未结 5 1010
生来不讨喜
生来不讨喜 2021-02-19 04:00

I don\'t necessarily need to run it at server, however, I would like to use the ~/js/somefile.js syntax.

Previously, I had just set everything with Absolute

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-19 04:23

    You can use functions inside the path string, though, e.g.

    
    

    However that's the ASP.NET MVC syntax for local paths - I can't remember the forms version off the top of my head.

提交回复
热议问题