Tips Using JQuery

While working with JQuery I could not get it work since I referenced the file as shown below

 

<script language="javascript" src="~/JavaScript/jquery-1.3.1.js' type="text/javascript"></script>

 

The reason was that I was using a Master Page and hence I had to do the following to get it work

 

<script language="javascript" src='<%=ResolveUrl("~/JavaScript/jquery-1.3.1.js" ) %>' type="text/javascript"></script>

 

Most of the example provide are without the use of Master Pages hence you never get the issue.

 

Hope this helps

 

Cheers!!!

 

 

Comments

Popular posts from this blog

“Unable to retrieve the metadata for …” Error while using ASP.NET MVC 3

Building application using ASP.NET MVC and MongoDB

Getting Started with ASP.NET MVC, SignalR KnockoutJS