日期:2014-05-17  浏览次数:20529 次

关于自动触发linkbutton onclick事件
详细请看如下。主页面有2个webcontrol。Detail 和 summary
主页部分:
HTML code
<tr>
                        <td colspan="2">
                            <asp:LinkButton ID="lnkbtnAddItem" runat="server" OnClick="lnkbtnAddItem_Click">Add Item</asp:LinkButton>
                            &nbsp;
                            <asp:LinkButton ID="lnkbtnUpdate" runat="server" OnClick="lnkbtnUpdate_Click">Update</asp:LinkButton>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <asp:UpdatePanel ID="updatepanel1" runat="server" UpdateMode="Always">
                                <ContentTemplate>
                                    <table cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td>
                                                <cc1:TabContainer ID="TabContainerADMF07" runat="server" Width="100%">
                                                    <cc1:TabPanel runat="server" HeaderText="" ID="TabPanelADMF07Detail">
                                                        <HeaderTemplate>
                                                            Details
                                                        </HeaderTemplate>
                                                        <ContentTemplate>
                                                            <uc1:uc_ADM_F07Detail ID="uc_ADM_F07Detail1" runat="server" />
                                                        </ContentTemplate>
                                                    </cc1:TabPanel>
                                                    <cc1:TabPanel runat="server" HeaderText="" ID="TabPanelADMF07Summary">
                                                        <HeaderTemplate>
                                                            Summary
                                                        </HeaderTemplate>
                                                        <ContentTemplate>
                                                            <uc2:uc_ADM_F07Summary ID="uc_ADM_F07Summary1" runat="server" />
                                                        </ContentTemplate>
                                                    </cc1:TabPanel>
                                                </cc1:TabContainer>
                                            </td>
                                        </tr>
                                    </table>
                                </ContentTemplate>
                                <Triggers>
                                    <asp:AsyncPostBackTrigger ControlID="lnkbtnUpdate" EventName="Click" />
                                </Triggers>
                            </asp:UpdatePanel>
                        </td>
                    </tr>


Detail页面部分(就一个gridview控件):
HTML code
<asp:GridView ID="grdviewadmf07_dtl" runat="server" Width="100%" AutoGenerateColumns="False"
                DataKeyNames="netno" AllowPaging="True&