Click here to Skip to main content
15,939,243 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
dear All,

i face the problem in Tab-container. i want when user click(Onactiveclientchange) on the tab then its trigger the update panel which is inside the tab-panel.

my code is given below..


XML
<asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div>
            <asp:TabContainer ID="TabContainer1" runat="server" Width="372px"  ActiveTabIndex="0"  OnClientActiveTabChanged="clientActiveTabChanged" >
            <asp:TabPanel ID="test" runat="server" HeaderText="panel">
            <ContentTemplate>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                  
            <ContentTemplate>
             <asp:GridView ID="TestGrid" runat="server" AutoGenerateColumns="False"
                    DataKeyNames="ItemID" DataSourceID="SqlDataSource1" Height="141px"
                    Width="334px"  >
             <Columns>
                 <asp:TemplateField HeaderText="Item Id">
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server"  Text='<%# Bind("ItemID") %>'></asp:Label>
                  </ItemTemplate>
                  </asp:TemplateField>
                     <asp:TemplateField HeaderText="ItemDescription">
                     <ItemTemplate>
                    <asp:LinkButton ID="LinkEdit" runat="server" Text='<%# Bind("ItemDescription") %>' CommandArgument='<%# Bind("ItemID")%>' OnClick="LinkEdit_OnClick"  ></asp:LinkButton>
                </ItemTemplate>
                 </asp:TemplateField>
                 <asp:BoundField DataField="Remarks" HeaderText="Remarks"
                     SortExpression="Remarks"  />
             </Columns>
              </asp:GridView>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server"
                    ConnectionString="<%$ ConnectionStrings:DeemahTestConnectionString %>"
                    SelectCommand="SELECT [ItemID], [ItemDescription], [Remarks] FROM [ItemMaster]">
                </asp:SqlDataSource>
                </ContentTemplate>
                </asp:UpdatePanel>
            </ContentTemplate>
            </asp:TabPanel>
            <asp:TabPanel ID="test1" runat="server" HeaderText="panel1" >
            <ContentTemplate>
               <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                     <ContentTemplate>
                      <asp:Label ID="lblMessage" runat="server" CssClass="lblMess"></asp:Label>
                            <div>
                            <table align="center">
                            <tr>
                            <td class="lableColumn">
                            <asp:Label ID="lblItemDescription" runat="server"  Text="Item Description :"></asp:Label>
                            </td>
                            <td>
                            <asp:TextBox ID="txtItemDescription" runat="server" ></asp:TextBox>
                            </td>
                            </tr>
                            <tr>
                            <td class="lableColumn">
                            <asp:Label ID="lblRemarks" runat="server"  Text="Remarks :"></asp:Label>
                            </td>
                            <td>
                            <asp:TextBox ID="txtRemarks" runat="server" TextMode="MultiLine" ></asp:TextBox>
                            </td>
                            </tr>
                            <tr>
                            <td></td>
                            <td>
                            <asp:Button ID="ItemMasterSave" runat="server" Text="Save"  CssClass="Btn"
                                    onclick="ItemMasterSave_Click"></asp:Button>
                            </td>
                            </tr>
                            </table>
                            </div>
                            </ContentTemplate>
                          </asp:UpdatePanel>
                </ContentTemplate>
             </asp:TabPanel>
            </asp:TabContainer>
           
        </div>
        <
</asp:Content>




i need when user add one item and click panel Tab then updatepanel1 is do postback and current data show in grid view.


please help me.................
Posted
Comments
Sandeep Mewara 25-Apr-11 7:27am    
Can you rephrase - it's little unclear on what are you trying to do.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900