updatePanel局部刷新问题
<asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true" UpdateMode="Always">
<ContentTemplate>
<tr>
<td class="tditem" style="height: 30px">
不良
</td>
<td colspan="3" style="height: 30px">
<asp:DropDownList ID="ddlIllCategory" runat="server" OnSelectedIndexChanged="ddlIllCategory_SelectedIndexChanged" AutoPostBack="true">
</asp:DropDownList>
</tr>
<tr id="trApprover" runat="server">
<td id="tdApprover" class="tditem" rowspan="3" runat="server">
人員
</td>
</tr>
<tr id="trApproverRD">
<td colspan="3" style="height: 76px">
<asp:Label ID="Label5" runat="server" Text="RD" Width="30px"></asp:Label>:
<asp:TextBox ID="txtApproverRD" runat="server" Style="overflow: visible" ReadOnly="true" /> </td>
</tr>
<tr id="trApproverSales">
<td colspan="3">
<asp:Label ID="Label7" runat="server" Text="業務" Width="30px"></asp:Label>:
<asp:TextBox ID="txtApproverSales" runat="server" Style="overflow: visible" ReadOnly="true" /> </td>
</tr>
<tr id="trApprove1" runat="server" visible="false">
<td colspan="2">
<asp:Label ID="lblPE" runat="server" Text="PE" Width="30px"></asp:Label>:
<asp:TextBox ID="txtPE" runat="server" Style="overflow: visible" ReadOnly="true" /> </td>
<td colspan="2">
<asp:Label ID="lblFPM" runat="server" Text="FPM" Width="40px"></asp:Label>:
<asp:TextBox ID="txtFPM" runat="server" Style="overflow: visible" ReadOnly="true" />
</td>
</tr>
<tr id="trApprove2" runat="server" visible="false">
<td colspan="2">
<asp:Label ID="lblCQA" runat="server" Text="CQA" Width="40px"></asp:Label>:
<asp:TextBox ID="txtCQA" runat="server" Style="overflow: visible" ReadOnly="true" />
</td>
<td colspan="2">
<asp:Label ID="lblMQA" runat="server" Text="主管" Width="50px"></asp:Label>:
<asp:TextBox ID="txtMQA" runat="server" Style="overflow: visible" ReadOnly="true" />
</td>
</tr>
<tr id="trApprove3" runat="server" visible="false">
<td colspan="3">
<asp:Label ID="lblQA" runat="server" Text="最高主管" Width="70px"></asp:Label>:
<asp:TextBox ID="txtQA" runat="server" Style="overflow: visible" ReadOnly="true" /> </td>
</tr>
</ContentTemplate>
</asp:UpdatePanel>
protected void ddlIllCategory_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlIllCategory.SelectedIndex != 0)
{
if (ddlPG.SelectedIndex != 0 && ddlCustomer.SelectedIndex != 0)
{
this.trApprove1.Visible = true;
this.trApprove2.Visible = true;
this.trApprove3.Visible = true;
this.tdApprover.RowSpan = 6;
}
}
}
這是table里的一段代碼,SelectedIndexChanged启动的时候,只刷新ContentTemplate的东西
我的上述代码这样写,还是全部刷新了,急求原因及答案!!