开发者

Link to resources such as css and javascript files

开发者 https://www.devze.com 2022-12-27 00:18 出处:网络
How can I link t开发者_如何学Goo resources such as css and javascript files? My default project is using links like ../../Content/styles.css. How can I do something like ~/content/styles.css? <link

How can I link t开发者_如何学Goo resources such as css and javascript files? My default project is using links like ../../Content/styles.css. How can I do something like ~/content/styles.css?


<link rel="stylesheet" href="<%= Url.Content("~/content/styles.css") %>" 
    type="text/css" />

<script src="<%= Url.Content("~/content/scripts/file.js") %>" 
    type="text/javascript"></script>


Leave out the ~. "/Content/styles.css"

0

精彩评论

暂无评论...
验证码 换一张
取 消