Dec 01, 2011, 7:34 AM
Well, you use .NET 2.0. There is no {} initialization.
I would recommend you to upgrade to, at least, .NET 3.5.
Here is a working on .NET 2.0 example.
Example .NET 2.0 C#
I would recommend you to upgrade to, at least, .NET 3.5.
Here is a working on .NET 2.0 example.
Example .NET 2.0 C#
<%@ Page Language="C#" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<%@ Import Namespace="System.Collections.Generic" %>
<script runat="server">
protected void EventStore_RefershData(object sender, StoreRefreshDataEventArgs e)
{
EventStore store = (EventStore)sender;
List<Event> events = new List<Event>();
Event ev = new Event();
ev.EventId = 1;
ev.Title = e.Parameters["test"];
ev.CalendarId = 1;
ev.StartDate = DateTime.Now;
ev.EndDate = DateTime.Now;
events.Add(ev);
store.DataSource = events;
}
</script>
<!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>Ext.Net Example</title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:Viewport runat="server" Layout="fit">
<Items>
<ext:CalendarPanel ID="CalendarPanel1" runat="server">
<EventStore
runat="server"
OnRefreshData="EventStore_RefershData"
IgnoreExtraFields="false">
<Proxy>
<ext:PageProxy />
</Proxy>
<BaseParams>
<ext:Parameter Name="test" Value="Hello World!" Mode="Value" />
</BaseParams>
</EventStore>
</ext:CalendarPanel>
</Items>
</ext:Viewport>
</form>
</body>
</html>