我在我的動態數據應用程序中使用了Ajax Calender Extender的日期篩選器。我得到的錯誤: -只有一個ScriptManager實例可以添加到頁面 - 動態數據和DateFilter
只有一個一個ScriptManager的實例可以添加到頁面
我明白,母版頁已經有劇本經理。我嘗試使用「Asp:ScriptManagerProxy」並沒有工作。
以下是我的DateFilter.ascx。任何幫助將不勝感激: -
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DateFilter.ascx.cs" Inherits="TestApp.DynamicData.Filters.DateFilter" %>
<%--<Asp:ScriptManagerProxy runat="server" ID="proxy"/>--%>
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</ajaxToolkit:ToolkitScriptManager>
<asp:TextBox ID="txtStartDate" runat="server"></asp:TextBox>
<asp:TextBox ID="txtEndDate" runat="server"></asp:TextBox>
<ajaxToolkit:CalendarExtender
ID="CalendarExtender1"
TargetControlID="txtStartDate"
runat="server" />
<ajaxToolkit:CalendarExtender
ID="CalendarExtender2"
TargetControlID="txtEndDate"
runat="server" />
下面是我的動態數據的應用程序
<%@ Master Language="C#" CodeBehind="Site.master.cs" Inherits="TestApp.Site" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Dynamic Data Site</title>
<link href="~/Site.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<h1 class="DDMainHeader">Test App</h1>
<div class="DDNavigation">
<%-- <a runat="server" href="~/"><img alt="Back to home page" runat="server" src="DynamicData/Content/Images/back.gif" />Back to home page</a>--%>
</div>
<form id="form1" runat="server">
<div>
<%-- TODO: Enable partial rendering by setting the EnablePartialRendering attribute to "true" to provide a smoother browsing experience.
Leaving partial rendering disabled will provide a better debugging experience while the application is in development. --%>
<asp:ScriptManager runat="server" EnablePartialRendering="true">
<Scripts>
<asp:ScriptReference Name="jquery" />
<asp:ScriptReference Name="WebUIValidation.js" Assembly="System.Web" />
</Scripts>
</asp:ScriptManager>
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
@Kamlesh - 嗯,我已經說過它的主頁面。另外 - 它的動態數據應用程序,其中網頁沒有用戶控件的編譯時參考。 –