Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
145
Issue with .NET 4.0?
posted

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.