I created a new ASP .net mvc 2 web application with that default template provided in VS 2008. I wanted to check the document.ready to see on how it fires. So in Site.Master I included the jQuery Scripts in the following way:
“
<script src="<%=Page.ResolveClientUrl("~/Scripts/JQuery/jquery-1.3.2-vsdoc.js")%>"
type="text/javascript"></script>
<script src="<%=Page.ResolveClientUrl("~/Scripts/JQuery/jquery-1.3.2.min-vsdoc.js")%>"
type="text/javascript"></script>
<script src="<%=Page.ResolveClientUrl("~/Scripts/JQuery/jquery-1.3.2.min.js")%>"
type="text/javascript"></script>
<script src="<%=Page.ResolveClientUrl("~/Scripts/Jquery/jquery.validate-vsdoc.js")%>"
type="text/javascript"></script>
<script src="<%=Page.ResolveClientUrl("~/Scripts/JQuery/jquery.validate.js")%>" type="text/javascript"></script>
<script src="<%=Page.ResolveClientUrl("~/Scripts/JQuery/jquery.validate.min-vsdoc.js")%>"
type="text/javascript"></script>
<script src="<%=Page.ResolveClientUrl("~/Scripts/JQuery/jquery.validate.min.js")%>"
type="text/javascript"></script>
<script src="<%=Page.ResolveClientUrl("~/Scripts/JQuery/MicrosoftAjax.js")%>" type="text/javascript"></script>
<script src="<%=Page.ResolveClientUrl("~/Scripts/JQuery/MicrosoftMvcAjax.debug.js")%>"
type="text/javascript"></script>
<script src="<%=Page.ResolveClientUrl("~/Scripts/JQuery/MicrosoftMvcValidation.js")%>"
type="text/javascript"></script>
<script src="<%=Page.ResolveClientUrl("~/Scripts/JQuery/MicrosoftMvcValidation.debug.js")%>"
type="text/javascript"></script>
<script src="<%=Page.ResolveClientUrl("~/Scripts/JQuery/MicrosoftAjax.debug.js")%>"
type="text/javascript"></script>
<script src="<%=Page.ResolveClientUrl("~/Scripts/JQuery/MicrosoftMvcAjax.js")%>"
type="text/javascript"></script>
But when I load the application, I get the following javascript error:
Error: Sys.ArgumentTypeException: Object of type ‘Sys._Application’ cannot be converted to type ‘Sys._Application’.
Parameter name: instance
Source File: http://localhost:1108/Scripts/JQuery/MicrosoftAjax.debug.js
Line: 1559
Don’t know whats wrong in this? I checked if the jquery files are not downloaded, but all of them get downloaded fine. Any help would be appreciated.
You are including WAY to much stuff.
Your error is because your are including both MicrosoftAjax.debug.js and MicrosoftAjax.js. Choose one.
The *.debug.js files are same as the *.js files but in a readable format. Readable means larger file size and should only be used during development.
The *.vsdoc.js files are only for intellicense in Visual Studio and should never be included like this.