[Mono-aspnet-list] System.InvalidCastException with ScriptManager
ornitorrinc
ornitorrinc at gmail.com
Tue Feb 16 04:16:08 EST 2010
Hello everybody,
I am attempting to create a small test site using Mono and AJAX to test
ExtJS_Extender_Controls, with:
- Mono 2.6.1
- VS 2008
- Mono Tools 1.0
- ExtJs Extender Controls 3.3.0
The only page it has is:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="Default" %>
<%@ Register Assembly="ExtExtenders" Namespace="ExtExtenders"
TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script>
function renderRating(val){
if(val > 8){
return String.format('{0}',val);
}
else{
return String.format('{0}',val);
}
}
function DoClient() {
alert("Menu clicked");
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div style="position:relative;top:20px;left:30px">
<cc1:YuiGrid ID="YuiGrid1" AutoGenerateColumns="True"
EnableRowSorting="True"
Width="550px" EnablePaging="True" PagingStyle="NavBar"
title="Movies"
runat="server"
AutoPostBack="true" CheckboxSelection="False"
EnableBufferData="False" EnableEdit="False" Height="300px"
SelectMultiple="False" >
</cc1:YuiGrid>
</div>
</div>
</form>
</body>
</html>
The solution builds right with VS2008 but when I try to run it in Mono:
Cannot cast from source type to destination type.
Description: HTTP 500. Error processing request.
Stack Trace:
System.InvalidCastException: Cannot cast from source type to destination
type.
at System.Web.UI.ScriptManager.GetCurrent (System.Web.UI.Page page)
[0x00011] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6.1\mcs\class\System.Web.Extensions\System.Web.UI\ScriptManager.cs:398
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke
(object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags
invokeAttr, System.Reflection.Binder binder, System.Object[] parameters,
System.Globalization.CultureInfo culture) [0x000ca] in
C:\cygwin\tmp\monobuild\build\BUILD\mono-2.6.1\mcs\class\corlib\System.Reflection\MonoMethod.cs:209
Version information: Mono Runtime Version: 2.6.1 (tarball); ASP.NET Version:
2.0.50727.1433
Here is the full site (really simple):
http://n4.nabble.com/file/n1557102/extatica.zip extatica.zip
Thanks for your help (and sorry for my english)
--
View this message in context: http://n4.nabble.com/System-InvalidCastException-with-ScriptManager-tp1557102p1557102.html
Sent from the Mono - ASP.NET mailing list archive at Nabble.com.
More information about the Mono-aspnet-list
mailing list