2013-02-24 34 views
1

在母版頁的一部分,我使用ScriptManager所以在內容頁面根據下面的標記我已回發只是部分頁面。根據下面標記爲母版頁母版頁當我使用ToolkitScriptManager在MasterPage上不起作用只是頁面

<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 /> 



</ContentTemplate> 
<Triggers> 
<asp:PostBackTrigger ControlID="ddlProjectDocument" /> 


</Triggers> 
</asp:UpdatePanel> 

現在我已經加入組合框到我的內容頁,所以我刪除的ScriptManager並將ToolkitScriptManager,現在當我使用下拉列表控件回發發生不完整的頁面只是像以前一樣,我怎麼能解決這個問題?

<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> 

標記新內容頁是象下面這樣:

<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> 

回答

0

因爲的AutoPostBack =真實是在面板的裏面,它會導致回發。

我能得到你的例子使用的工作:

<asp:AsyncPostBackTrigger ControlID="ddlProjectDocument" />

希望這有助於!

相關問題