How to get root path (~/) in asp.net Web form and MVC?
In web form: ResolveClientUrl
Code:
buttonImage: '<%=ResolveClientUrl("~/scripts/images/calendar.gif")%>',
In MVC: Url.Content
Code:
src="<%= Url.Content("~/Scripts/jquery-1.3.2.min.js")%>"></script>
No comments:
Post a Comment