在我在母版页中使用 ScriptManager 之前。当我运行主页时,我没有任何问题。
现在我决定将组合框添加到主页,所以我应该将 ToolkitScriptManager 添加到母版页。
由于错误,我删除了母版页的 ScriptManager,但现在我的主页已完全回发并且速度很慢,我如何才能将它们都放在母版页中而不会出错。
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlProjectDocument" runat="server" Height="16px" AppendDataBoundItems="True"
Width="212px" onselectedindexchanged="ddlProjectDocument_SelectedIndexChanged"
AutoPostBack="True" onload="ddlProjectDocument_Load"
style="font-family: 'Courier New', Courier, monospace" >
<asp:ListItem Selected="True" Value="0">(select a value)</asp:ListItem>
</asp:DropDownList>
<br />
<ajaxtoolkit:ComboBox ID="ComboBox1" runat="server" onload="ComboBox1_Load"
AutoCompleteMode="Suggest"
style="font-family: 'Courier New', Courier, monospace" >
</ajaxtoolkit:ComboBox>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="ddlProjectDocument" />
</Triggers>
</asp:UpdatePanel>
母版页:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterAdmin.master.cs" Inherits="MasterAdmin" %>
<!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>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<style type="text/css">
.style1
{
width: 40%;
font-size:large;
}
</style>
<link href="StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<ajaxtoolkit:toolkitscriptmanager ID="ToolkitScriptManager1" runat="server">
</ajaxtoolkit:toolkitscriptmanager>