Click here to Skip to main content
15,905,781 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
- Visual Studio 2010 Professional

I hope someone can shed some light on this because I'm tearing my hair out here and I don't have that much left.

When I add the jQuery library using a regular script tag, intellisense works just fine:
XML
<script src="~/Scripts/jquery-1.4.1.js" type="text/javascript"></script>

If I use a ScriptManager control, intellisense stops working:
XML
<asp:ScriptManager runat="server" EnablePageMethods="true">
    <Scripts>
        <asp:ScriptReference Path="~/Scripts/jquery-1.4.1.js" />
    </Scripts>
</asp:ScriptManager>

The page still displays as expected I just have no intellisense at design time.

This seems to have been an issue in beta versions of Visual Studio 2010 but by all accounts it has been fixed in the final release.

Thanks for your time.
Adam
Posted
Updated 5-Jan-11 2:35am
v3

I have found a solution to my problem, so just posting here for completeness.

I added the following statement to my master page:
XML
<% if (false) { %>
    <script src="~/Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
<% } %>

I now have intellisense for jQuery in Visual Studio 2010.

Adam
 
Share this answer
 
Well, to me, your actual problem was that the scrip intellisense was not getting enabled when referenced using Script manager and that still stands!

To that, I think one of the possible reasons can be the relative URL of the file. It might not be the same as you are using at other place.
 
Share this answer
 
Comments
Adam Jasper 5-Jan-11 9:37am    
Don't think it is the relative URL of the file or surely it wouldn't work at runtime? Visual Studio is claiming to find the file and the -vsdoc.js file is sitting right next to it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900