jquery - Error when publishing MVC websystem in Windows Server 2008 -
when publish mvc 5 websystem ,below error appear when check in google chrome inspect element.

below code add in view:
@model abc.def.models.clsseceditors @{ viewbag.title = "index"; } <style type="text/css"> .deletelink { cursor: pointer; } </style> <link href="/content/jqueryui/jquery-ui.css" rel="stylesheet" /> <link href="/content/jqsimplemenu.css" rel="stylesheet" /> <link href="/content/bootstrap.css" rel="stylesheet" /> <link href="/content/site.css" rel="stylesheet" /> <link href="/content/datepicker.css" rel="stylesheet" /> <script src="/scripts/modernizr-2.6.2.js"></script> <script src="/scripts/jquery-1.10.2.js"></script> <script src="/scripts/jquery-1.10.2.min.js"></script> <script src="/scripts/respond.js"></script> <script src="/scripts/moment.js"></script> <script src="/scripts/bootstrap.js"></script> <script src="/scripts/bootstrap-datepicker.js"></script> <script src="/scripts/jquery-ui.js"></script> <!-- script menu --> <script src="/scripts/jqsimplemenu.js" type="text/javascript"></script> <script src="~/scripts/functions/seceditor.js"></script> <br> @using (html.beginform(null, null, formmethod.post, new { id = "abc" })) {...} when develop using laptop, there no issues , works find. i'm not sure why when publish it, errors appear. can guys me solve issue? thanks.
i think there problem last script loaded. anyway try use url.content() method resolve path.
do :
<script src="@url.content("~/scripts/functions/seceditor.js")></script> and css , js reference on page have described in sample code.
you can find basic info on below link:
url.content() resolve relative urls cshtml
let me know if doesn't work.
Comments
Post a Comment