Click here to Skip to main content
12,828,988 members (40,840 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET SQL-Server
i want to how to sue triggers in programing and where it will be use in real time programming can u guide or send any snippets
Posted 12-Feb-12 16:09pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


AsyncPostBackTrigger is used to trigger the controls which are outside the updatepanel control on an asynchronus post back.

for more info see following links...

AsyncPostBackTrigger Class

AsyncPostBackTrigger vs PostBackTrigger

Also see below example code:

<head  runat="server">
    <script type="text/javascript">
        function ShowModal() {
            //Call the Customized user's contro progress bar modal popup... 
            var modalPopupBehavior = $find('loader');
            return true;
    <form id="form1"  runat="server">
        <table cellpadding="4" cellspacing="0" border="0" width="40%" style="margin-removed 5px;">
                <td width="5%">
                <td align="center" colspan="3">
                                <asp:UpdatePanel ID="upBtnSearch" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional">
                                        <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click"
                                            OnClientClick="ShowModal();" />
                                <asp:Button ID="btnClear" runat="server" Text="Clear" OnClientClick="ShowModal();"
                                    OnClick="btnClear_Click" />
                <td width="5%">
                <td width="2%">
                <td align="center">
                    <asp:UpdatePanel ID="upGridClaims" runat="server">
                            <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" />
                            <asp:GridView AutoGenerateColumns="false" ID="grdClaims" runat="server" OnSorting="grdClaims_Sorting"
                                AllowSorting="true" DataKeyNames="ClaimRecID" OnPageIndexChanging="grdClaims_PageIndexChanging"
                                    <asp:BoundField HeaderText="Claims ID" DataField="ClaimNo" SortExpression="ClaimNo" />
                                    <asp:BoundField HeaderText="Status" DataField="ClaimStatus" SortExpression="ClaimStatus" />
                                    <asp:TemplateField HeaderText="Auth. Code" SortExpression="ClaimStatus">
                                            <asp:LinkButton ID="lnkAuth" runat="server" Text='<%# Eval("LinkText")%>' OnClick="lnkAuth_Click"></asp:LinkButton>
                                        <ItemStyle HorizontalAlign="Left" />
                <td width="2%">

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

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170326.1 | Last Updated 12 Feb 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100