Intellisense (for jquery) in MVC razor views

Another quick tip. When using master pages or razor layouts you tend to put the script includes in the master but this means your child or view pages do not include any references to the scripts. Therefore you start writing some jquery in your view an Visual Studio does not provide any intellisense. So put the following at the top your view;

@if (false)

<script src= type=”text/javascript”>



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s