I have an ASPX page that works fine in a seperate development project. I am now trying to move the page into a Visual Studio 2015 project that creates a SharePoint 2010 package. I just want to deploy the page into the site.
When I load the page through the SharePoint 2010 site, I get a Parser Error page saying that the event handler for OnNeedDataSource is not allowed on this page. If I remove that event, it complains about the first event that it finds.
Any suggestions on what I might be missing in order to get the events firing?
The error is:
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The event handler 'OnNeedDataSource' is not allowed in this page.
Source Error:
Line 37: <telerik:RadCheckBox ID="RadCheckBoxShowDisabledConnections" runat="server" Text="Show Disabled Connections">
Line 38: </telerik:RadCheckBox>
Line 39: <telerik:RadGrid ID="RadGridConnections" runat="server" Width="100%"
Line 40: AllowFilteringByColumn="True"
Line 41: AllowPaging="True" PageSize="5"
Source File: /Pages/TestPage.aspx Line: 39
Version Information: Microsoft .NET Framework Version:2.0.50727.8745; ASP.NET Version:2.0.50727.8745
The ASPX page is:
<%@ Assembly Name="PSC.UDCS.SP2010, Version=1.0.0.0, Culture=neutral, PublicKeyToken=21ff67ef5617fb2f" %>
<%@ Register TagPrefix="asp" Namespace="System.Web.UI" Assembly="System.Web" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Assembly="Telerik.Web.UI, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Page Language="C#" CodeBehind="UdcsTestPage.aspx.cs" Inherits="PSC.UDCS.SP2010.UdcsTestPage" MasterPageFile="~/_catalogs/masterpage/default.master" %>
<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
</asp:Content>
<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
UDCS-Connections
</asp:Content>
<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
Unmanned Device Connection Service - Connections
</asp:Content>
<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
<telerik:RadScriptManager ID="RadScriptManager1" runat="server"> </telerik:RadScriptManager>
<h2>Unmanned Device Connections - Connection Setup</h2>
<asp:Label runat="server" ID="CompileTime"></asp:Label>
<asp:Label runat="server" ID="Label1"></asp:Label>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="RadGrid1">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="RadGridConnections" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadCheckBox ID="RadCheckBoxShowDisabledConnections" runat="server" Text="Show Disabled Connections">
</telerik:RadCheckBox>
<telerik:RadGrid ID="RadGridConnections" runat="server" Width="100%"
AllowFilteringByColumn="True"
AllowPaging="True" PageSize="5"
AllowSorting="True"
AllowAutomaticUpdates="True"
AllowAutomaticDeletes="true"
RenderMode="Lightweight"
OnNeedDataSource="RadGridConnections_OnNeedDataSource"
OnItemDataBound="RadGridConnections_OnItemDataBound"
OnDeleteCommand="RadGridConnections_OnDeleteCommand"
OnUpdateCommand="RadGridConnections_OnUpdateCommand"
OnInsertCommand="RadGridConnections_OnInsertCommand"
OnItemCommand="RadGridConnections_OnItemCommand"
>
<GroupingSettings CaseSensitive="false" />
<PagerStyle Mode="NextPrevAndNumeric" />
<MasterTableView CommandItemDisplay="TopAndBottom" Width="100%" DataKeyNames="ID, Station,Device,TemplateName" AutoGenerateColumns="False" >
<Columns>
<telerik:GridButtonColumn CommandName="Edit" Text="Edit" UniqueName="Edit" />
<telerik:GridButtonColumn ConfirmText="Disable this connection?" ConfirmDialogType="RadWindow" ConfirmTitle="Disable" CommandName="Delete" />
<telerik:GridBoundColumn UniqueName="ID" DataField="ID" Display="False" />
<telerik:GridBoundColumn UniqueName="DeviceId" DataField="DeviceId" Display="False" />
<telerik:GridBoundColumn UniqueName="Station" HeaderText="Station" DataField="Station" />
<telerik:GridBoundColumn UniqueName="Device" HeaderText="Device" DataField="Device" />
<telerik:GridBoundColumn UniqueName="TemplateName" HeaderText="TemplateName" DataField="TemplateName" />
<telerik:GridBoundColumn UniqueName="ApplicationPort" HeaderText="ApplicationPort" DataField="ApplicationPort" />
<telerik:GridBoundColumn UniqueName="UseMultiHomed" HeaderText="UseMultiHomed" DataField="UseMultiHomed" />
<telerik:GridBoundColumn UniqueName="Application" HeaderText="Application" DataField="Application" />
<telerik:GridBoundColumn UniqueName="Access" HeaderText="Access" DataField="Access" />
<telerik:GridBoundColumn UniqueName="Connection" HeaderText="Connection" DataField="Connection" />
<telerik:GridBoundColumn UniqueName="WhiteListIps" HeaderText="WhiteListIps" DataField="WhiteListIps" />
</Columns>
<EditFormSettings UserControlName="UdcsConnectionEdit.ascx" EditFormType="WebUserControl">
<EditColumn UniqueName="EditCommandColumn1">
</EditColumn>
</EditFormSettings> </MasterTableView>
</telerik:RadGrid>
</asp:Content>