DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Including Javascript In MVC 3 View

11.06.2011
| 5149 views |
  • submit to reddit
        
// In the head section of Master page
@RenderSection("Script");

// In View
@section Script
{
    // Showing jQuery intellisense but not rendering it
    @if (false) { <script src="~/Scripts/jquery-1.5.1-vsdoc.js" type="text/javascript"></script> }
    <script type="text/javascript">
        
    </script>
}