How to use Registerstartupscript in my project ? Is it any soluction for that ?
3 Answers
inHTML Code :
<%@ Import Namespace="MvcTest.HelperExtension" %>
<script src="<%= Url.jQueryUI("jquery.ui.accordion.min.js")%>" type="text/javascript"></script>
. . . .
in Code :
public static class UrlHelperExtension
{
public static string jQuery(this UrlHelper helper, string fileName)
{
return helper.Content(string.Format("~/Content/Scripts/{0}", fileName));
}
}
1 Comment
javad ghadiri
See This Link : stackoverflow.com/questions/5628611/…
Take a look here http://www.codeproject.com/Articles/38936/Using-WebControls-In-ASP-NET-MVC-Views-Part-3.aspx