2014-01-21 55 views
0

我使用這個代碼,但這是不工作..與ID「imgbtn_excel_gridout」 A控制無法找到用於在所述觸發的UpdatePanel「UpdatePanel3」

1.當我從刪除更新面板此代碼它會工作,但與更新面板此代碼無法正常工作。 2.我也使用觸發按鈕發送異步請求。

  <asp:GridView ID="GridView2" runat="server" ShowFooter="True" AutoGenerateColumns="False" 
      CellPadding="4" ForeColor="Black" AllowPaging="True" 
      onpageindexchanging="GridView2_PageIndexChanging" 
      onrowdatabound="GridView2_RowDataBound" 
      onselectedindexchanged="GridView2_SelectedIndexChanged" 
      DataKeyNames="id,date" BackColor="#CCCCCC" BorderColor="#999999" BorderStyle="Solid" 
         BorderWidth="3px" CellSpacing="2" PageSize="5" GridLines="None"> 
      <Columns> 
       <%-- <asp:BoundField DataField="date" HeaderText="DATE" DataFormatString="{0:MM/dd/yy}"> 
       --%> 
       <asp:BoundField DataField="Id" HeaderText="REF. ID"> 
       <ItemStyle BackColor="#33CC33" BorderColor="Maroon" Font-Bold="True" 
        Font-Italic="True" ForeColor="#CC3300" /> 
       </asp:BoundField> 
       <asp:BoundField DataField="Name" HeaderText="AUTHO. NAME" /> 
       <asp:BoundField DataField="ItemType" HeaderText="ITEM TYPE"> 
       <HeaderStyle Width="100px" /> 
       </asp:BoundField> 
       <asp:BoundField DataField="Quantity" HeaderText="QUANTITY"> 
       <HeaderStyle Width="130px" /> 
       </asp:BoundField> 
       <asp:BoundField DataField="Brand" HeaderText="BRAND" /> 
       <asp:BoundField DataField="SubType" HeaderText="SUB TYPE"> 
       <HeaderStyle Width="100px" /> 
       </asp:BoundField> 
       <asp:BoundField DataField="Date" HeaderText="DATE" 
        DataFormatString="{0:yyyy-MM-dd HH:mm:ss}"> 

       <HeaderStyle Width="100px" /> 
       </asp:BoundField> 
        <asp:TemplateField SortExpression="QuantityInPiece" HeaderText="Quantity In Piece" > 
        <ItemTemplate > <asp:Label ID="lblId" runat="server" Text='<%# Bind("QuantityInPiece") %>'></asp:Label> </ItemTemplate> 
         <FooterTemplate> 
          <asp:ImageButton ID="imgbtn_excel_gridout" runat="server" 
           ImageUrl="~/images/excel.jpg" Width="20px" Height="15px" 
           onclick="imgbtn_excel_gridout_Click"> 
         </asp:ImageButton> 
         </FooterTemplate> 
        </asp:TemplateField> 
      </Columns> 
      <FooterStyle BackColor="#CCCCCC" BorderStyle="Solid" /> 
      <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" /> 
      <PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" /> 
      <RowStyle BackColor="White" /> 
      <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" /> 
      <SortedAscendingCellStyle BackColor="#F1F1F1" /> 
      <SortedAscendingHeaderStyle BackColor="#808080" /> 
      <SortedDescendingCellStyle BackColor="#CAC9C9" /> 
      <SortedDescendingHeaderStyle BackColor="#383838" /> 

      <SortedAscendingCellStyle BackColor="#E9E7E2"></SortedAscendingCellStyle> 

      <SortedAscendingHeaderStyle BackColor="#506C8C"></SortedAscendingHeaderStyle> 

      <SortedDescendingCellStyle BackColor="#FFFDF8"></SortedDescendingCellStyle> 

      <SortedDescendingHeaderStyle BackColor="#6F8DAE"></SortedDescendingHeaderStyle> 
     </asp:GridView> 

         <br /> 
     </ContentTemplate> 
    <Triggers> 
     <asp:AsyncPostBackTrigger ControlID="imgbtn_excel_gridout" /> 
    </Triggers> 
</asp:UpdatePanel> 

回答

相關問題