I am using a updateProgress bar in my Page on ProcessButton event Click but it always visible in all post backs related another control events in this Page. when I click cancel Button it will be visible. on textchanged event of textbox it will be visible. I want see updateProgress will be work only on my BtnProcess Click event only .I have another one button for clear text box. also am using update Pane and ajax control on this page. how will solve my issue. in this page i have gave Post true a text box

       <div class="container-fluid">  
        <div class="row-fluid">
            <div class="well span5 center login-box">
            <div class="alert alert-info">
                    <font size="4"><b></b></font></div>                 

                <form id="form1" runat="server">                  
                    <fieldset>                        
                       <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" 
                            runat="server">
                        </ajaxToolkit:ToolkitScriptManager> 

                         <asp:UpdatePanel ID="pan1" runat="server">
                        <ContentTemplate>          
                      <table style="width: 100%">
                     <tr>                                                                             
                        <td align="left" colspan="2" class="style16">                            
                 <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                   <ContentTemplate>                 
           <asp:UpdateProgress ID="UpdateProgress1" DisplayAfter="10" runat="server" AssociatedUpdatePanelID="pan1">
            <ProgressTemplate>
                <div class="divWaiting">
                    <asp:Label ID="lblWait" runat="server" Text=" Your Data Is Processing... " />
                    <asp:Image ID="imgWait" runat="server" ImageAlign="Middle" ImageUrl="~/Processing/progress.gif" />
                </div>
            </ProgressTemplate>                     
        </asp:UpdateProgress>  
      </ContentTemplate></asp:UpdatePanel>
                            </td>
                </tr>

                <tr>                                                                             
                        <td align="right" class="style18">

                            Date</td>
                        <td align="left" class="style3">
                        <div class="input-prepend" title="Select Date" data-rel="tooltip">
                        <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                        <ContentTemplate> 
                            <asp:TextBox ID="txtDate" runat="server" AutoPostBack="True" 
                                ontextchanged="txtDate_TextChanged"></asp:TextBox>
                                <ajaxToolkit:CalendarExtender ID="CalendarExtender1"
                                    runat="server" Format="dd/MM/yyyy" TargetControlID="txtDate">
                                </ajaxToolkit:CalendarExtender>
                                </ContentTemplate></asp:UpdatePanel>
                                </div>
                        </td>
                </tr>


                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                         <asp:Button ID="btnProcess" class="btn-primary" runat="server" Text="Attendance Process" Height="36px" Width="133px" onclick="btnProcess_Click" />&nbsp&nbsp&nbsp
                <asp:Button ID="btnclear" class="btn-primary" runat="server" Text="Clear" Height="36px" Width="91px" 
onclick="btnclear_Click" />

                            <asp:Label ID="lblmsg" runat="server" ForeColor="Red"></asp:Label>
                            </ContentTemplate>                                       
                            </asp:UpdatePanel>
                        </td>
                </tr>
                    <tr>                                                                             

                        <td align="left" colspan="2" style3">
                             &nbsp&nbsp 
                    <%--          <div class="alert alert-info">
                    <font="4"><b>Processing Report.</b></font>
                </div>--%>
                             <asp:GridView ID="GridView1" style="margin-left:170px;" runat="server" BackColor="#DEBA84" 
                                 BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px" CellPadding="3" 
                                 CellSpacing="2" AllowPaging="True" AutoGenerateColumns="False" 
                                 DataSourceID="SqlDataSource1" PageSize="5" 
                                 onpageindexchanging="GridView1_PageIndexChanging">
                                 <Columns>
                                    <asp:TemplateField HeaderText="SL.No">
                                     <ItemTemplate>
                                          <%#Container.DataItemIndex+1 %>
                                     </ItemTemplate>
                                     <HeaderStyle HorizontalAlign="Left" />
                          </asp:TemplateField>
                                     <asp:BoundField DataField="ProcDate" HeaderText="ProcDate" 
                                         SortExpression="ProcDate" ReadOnly="True" />
                                     <asp:BoundField DataField="Status" HeaderText="Status" 
                                         SortExpression="Status" />
                                 </Columns>
                                 <FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
                                 <HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
                                 <PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
                                 <RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
                                 <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
                                 <SortedAscendingCellStyle BackColor="#FFF1D4" />
                                 <SortedAscendingHeaderStyle BackColor="#B95C30" />
                                 <SortedDescendingCellStyle BackColor="#F1E5CE" />
                                 <SortedDescendingHeaderStyle BackColor="#93451F" />
                             </asp:GridView>
                        </td>
                </tr>
                <tr>                                                                             
                        <td align="left" style3" class="style19">

                            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                                ConnectionString="<%$ ConnectionStrings:ManjilasConnectionString %>" 

                                SelectCommand="select Convert(varchar(10),ProcDate,126)As ProcDate,Status from ProcessingDate   order by ProcDate desc"></asp:SqlDataSource>

                        </td>
                </tr>                 
              </table>
                    </ContentTemplate>
                      <Triggers>
                       <asp:PostBackTrigger ControlID="btnProcess" />
                        </Triggers><%----%>
                        </asp:UpdatePanel>
                            </div>
                        </i></span>

                </fieldset>

                </form>
                 </div>
                </div><!--/span-->
              </div>

Related posts

Recent Viewed