Including javascript in MVC 3 View


/ Published in: C#
Save to your folder(s)



Copy this code and paste it in your HTML
  1. // In Master page
  2. @RenderSection("Script");
  3.  
  4. // In View
  5. @section Script
  6. {
  7. // Showing jQuery intellisense but not rendering it
  8. @if (false) { <script src="~/Scripts/jquery-1.5.1-vsdoc.js" type="text/javascript"></script> }
  9. <script type="text/javascript">
  10.  
  11. </script>
  12. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.