I have reviewed the videos, downloaded the project, and added the reference and control for the MvcScriptManager.
Running the application, it is returning a Javascript error from the Ajax library. The error is:
"Microsoft JScript runtime error: Sys.ArgumentTypeException: Object of type 'Sys._Application' cannot be converted to type 'Sys._Application'. Parameter name: instance"
This occurs in:
Sys._getBaseMethod = function Sys$_getBaseMethod(type, instance, name) { if (!Sys._isInstanceOfType(type, instance)) throw Error.argumentType('instance', Object.getType(instance), type);var baseType = type.getBaseType();if (baseType) {var baseMethod = baseType.prototype[name];return (baseMethod instanceof Function) ? baseMethod : null;}return null;}
I have implemented this with the Javascript Map function:
function map() { $get("PhoneNumber").value = $find("").get_value); } // -->
<script type="text/javascript">function map() {$get("PhoneNumber").value = $find("<%= PhoneNumberInput.ClientID %>").get_value);}</script><% using (Html.BeginForm()) {%><%: Html.ValidationSummary(true) %><%: Html.Hidden("PhoneNumber") %>
and have the insert of the IGMvcScriptManager as the last line before the closing of the "using (Html.BeginForm())" statement.
Since your sample project cannot be opened by my verson of Visual Studio 2010, I am wondering if anyone has been able to get that project to work in this environment, or if anyone might know what my issue is.
Thanks.
Try with the following Code
<asp:ScriptManager runat="server" ID="ScriptManager1" AjaxFrameworkMode="Enabled" > <Scripts> <asp:scriptreference path="~/scripts/Ajax40/MicrosoftAjax.js" /> <asp:scriptreference path="~/scripts/Ajax40/MicrosoftAjaxTemplates.js" /> </Scripts> </asp:ScriptManager>
You also may want to try and run against the bits compiled for .NET 4.
http://netadvantagemvc.codeplex.com/releases