Click here to Skip to main content
11,496,146 members (1,480 online)
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
Dear All,

I am using an updateprogress control in combination with an update panel.
When i am trying to call it,it's not working.

My Update Panel is-

<asp:UpdatePanel ID="UpdatePanel1" runat="server" >
                    <ContentTemplate>
                        <asp:GridView ID="InboxGrid" runat="server" EnableViewState="false" OnPageIndexChanged="InboxGrid_PageIndexChanged"
                            Width="100%" AutoGenerateColumns="False" PageSize="20" BorderColor="White" AllowSorting="True"
                            border="1" HorizontalAlign="Center" CellPadding="1" BorderWidth="1pt" CssClass="DataGridStyleNew"
                            BackColor="#d9e6f7">
                            <HeaderStyle CssClass="DataGridHeaderStyleNew"></HeaderStyle>
                            <Columns>
                                <asp:CommandField ShowDeleteButton="True" Visible="false" />
                                <asp:TemplateField>
                                    <HeaderStyle Wrap="False" Height="10px" ForeColor="Green"></HeaderStyle>
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="chkAll" Enabled="True" onclick="javascript:SelectAllCheckboxes(this);"
                                            runat="server" AutoPostBack="false" ToolTip="Select/Deselect All" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkSelect" name='<%# DataBinder.Eval(Container.DataItem,"PROC_REG_NO") &amp; "@" &amp; DataBinder.Eval(Container.DataItem,"UserType") &amp; "@" &amp; DataBinder.EVal(Container.DataItem,"VER_NO")& "@" & DataBinder.Eval(Container.DataItem,"STEP_ID") & "@" & DataBinder.Eval(Container.DataItem,"HOLD_STATUS") & "@" & DataBinder.Eval(Container.DataItem,"HOLD_BY") & "@" & DataBinder.Eval(Container.DataItem,"FORM CAP") & "@" & DataBinder.Eval(Container.DataItem,"USER_ID") & "@" & DataBinder.Eval(Container.DataItem,"ORIGINATOR")%>'
                                            onclick="javascript:HighlightRow(this);" runat="server" OnCheckedChanged="InboxGrid_CheckedChanged"
                                            AutoPostBack="false" />
                                    </ItemTemplate>
                                    <FooterTemplate>
                                        <asp:TextBox ID="txtFormNames" Rows="0" Columns="0" Width="0" Height="0" Visible="false"
                                            runat="server" />
                                    </FooterTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        <asp:Image ID="History" runat="server" AlternateText="View Track Record" ImageUrl="..\imgs\History.ICO"
                                            AutoPostBack="false" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <!--Sudhir-14/4-->
                                        <a href="#" name='<%# DataBinder.Eval(Container.DataItem,"PROC_REG_NO") & "@" & DataBinder.Eval(Container.DataItem,"FORM CAP")%>'
                                            onclick="ShowHistory(name);">
                                            <img src="../Imgs/History.ICO" border="0" alt="View Track Record"></a>
                                        <!--Sudhir-14/4-->
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <HeaderTemplate>
                                        <asp:Image ID="Form" runat="server" AlternateText="View Form" ImageUrl="..\imgs\ViewForm3.gif"
                                            AutoPostBack="true" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <!--Sudhir-14/4-->
                                        <a href="#" name='<%# DataBinder.Eval(Container.DataItem,"PROC_REG_NO")& "@" & DataBinder.Eval(Container.DataItem,"UserType") & "@" & DataBinder.Eval(Container.DataItem,"VER_NO")& "@" & DataBinder.Eval(Container.DataItem,"STEP_ID") & "@" & DataBinder.Eval(Container.DataItem,"HOLD_STATUS") & "@" & DataBinder.Eval(Container.DataItem,"HOLD_BY") & "@" & DataBinder.Eval(Container.DataItem,"FORM CAP") & "@" & DataBinder.Eval(Container.DataItem,"USER_ID") & "@" & DataBinder.Eval(Container.DataItem,"ORIGINATOR") %>'
                                            onclick="ShowVoucher(name);">
                                            <img src="../Imgs/ViewForm3.gif" border="0" alt="View Form"></a>
                                        <!--Sudhir-14/4-->
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <%--            <PagerStyle Width="100%"  PageButtonCount="20" Mode="NumericPages"></PagerStyle>--%>
                        </asp:GridView>
                        <input type="hidden" name="txtPIDs">
                        <%--added by kaila for AJAX--%>
                        <input type="hidden" name="txtRowIndexes">
                        <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1" >
                            <ProgressTemplate>
                                <div id="Background">
                                </div>
                                <div id="Progress">
                                    <img src="loading.gif" style="vertical-align: middle" />
                                    Fetching Records Please Wait...
                                </div>
                            </ProgressTemplate>
                        </asp:UpdateProgress>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="clikSamePage" />
                    </Triggers>
                </asp:UpdatePanel>


Now i am trying to call the UpdateProgress on an Input button click which is outside this Update Panel.

<input id="clikSamePage" type="button" value="Click" onclick="fDelFromSamePage(this);" />

I know i have missed something but what exactly??
Posted 20-Jan-13 22:05pm
Edited 20-Jan-13 22:15pm
v2
Add UpdateMode = "Conditional" in your update panel.
  Permalink  
In the triggers section you have added the controlId but you have not added the event on which the updatepanel should get updated. Add the "click" event of the control to make it work.
  Permalink  
Comments
gouravkaila at 1-Feb-13 6:25am
   
I tried that also but my button (on which i want to fire the event) is outside the updatepanel


A control with ID 'clikSamePage' could not be found for the trigger in UpdatePanel 'UpdatePanel1'.

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

  Print Answers RSS
0 Dnyaneshwar@Pune 692
1 RyanDev 230
2 CHill60 208
3 Sascha Lefèvre 195
4 Sergey Alexandrovich Kryukov 124
0 Sergey Alexandrovich Kryukov 10,401
1 OriginalGriff 8,910
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600


Advertise | Privacy | Mobile
Web04 | 2.8.150520.1 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2015
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