Question

My Contact us form doesn't show UpdateProgress when i click the save button.

Below is the part code of the contact form. Code snipped is part of Contact.aspx page which uses master page. Similar code works on other pages which doesn't use master page. I am not sure where i am doing wrong i tried changed the position of UpdateProgress inside the update panel which didnt do anything.

Page works fine except showing the update progress.

I have also put delay of 3 section on code behind file also

   <!-- Contact Form -->                        
     <asp:UpdatePanel ID="updPnlContactUs" runat="server"  >
     <ContentTemplate>

    <asp:Panel ID="pnlContactUs"  runat="server" Visible="true" >
                    <table cellpadding="0" cellspacing="8" width="450px"  border="0">
                        <tr>
                            <td colspan="2"><asp:Label ID="lblRequired" CssClass="txtLabelComment" runat="server" Text="[*] indicates a required field."></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td width="110px">
                                <asp:Label ID="lblFullName" runat="server" Text="Full Name" CssClass="txtLabelComment"></asp:Label>
                            </td>
                            <td width="320px">
                                <asp:TextBox ID="txtFullName" runat="server" 
                                    CssClass="validate[required] txtbox300Comment" TabIndex="1" 
                                    ValidationGroup="vgContactUs" ></asp:TextBox>
                                &nbsp;*
                                <asp:RequiredFieldValidator ID="rfv1" runat="server" 
                                    ControlToValidate="txtFullName"></asp:RequiredFieldValidator>
                                </td>

                        </tr>
                        <tr>
                            <td >
                                <asp:Label ID="lblEmail" runat="server" Text="Email Address" CssClass="txtLabelComment"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtEmail" runat="server" 
                                    CssClass="validate[required,custom[email]] txtbox300Comment" TabIndex="2" 
                                    ValidationGroup="vgContactUs" ></asp:TextBox>
                                &nbsp;*
                                <asp:RequiredFieldValidator ID="rfv2" runat="server" 
                                    ControlToValidate="txtEmail"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                            <tr>
                                <td>
                                    <asp:Label ID="lblPhone" runat="server" CssClass="txtLabelComment" 
                                        Text="Phone Number"></asp:Label>
                                </td>

                                <td>
                                    <asp:TextBox ID="txtPhone" runat="server" 
                                        CssClass="validate[required, custom[phone]] txtbox300Comment" TabIndex="2" 
                                        ValidationGroup="vgContactUs"></asp:TextBox>
                                    &nbsp;*
                                    <asp:RequiredFieldValidator ID="rfvph" runat="server" 
                                        ControlToValidate="txtEmail"></asp:RequiredFieldValidator>
                                </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblFax" runat="server" CssClass="txtLabelComment" 
                                    Text="Fax Number"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtFax" runat="server" 
                                    CssClass="validate[required,custom[phone]] txtbox300Comment" TabIndex="2" 
                                    ValidationGroup="vgContactUs"></asp:TextBox>
                                &nbsp;*
                                <asp:RequiredFieldValidator ID="rfvfax" runat="server" 
                                    ControlToValidate="txtEmail"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblCountry" runat="server" CssClass="txtLabelComment" 
                                    Text="Country"></asp:Label>
                            </td>
                            <td>
                                <asp:DropDownList ID="ddCountry" runat="server" 
                                    CssClass="validate[required] ddGeneralComment" TabIndex="3">
                                    <asp:ListItem Value=""></asp:ListItem>
                                    <asp:ListItem Value="AF">Afghanistan</asp:ListItem>
                                </asp:DropDownList>
                                &nbsp;*<asp:RequiredFieldValidator ID="rfv3" runat="server" 
                                    ControlToValidate="ddCountry"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblMSG" runat="server" CssClass="txtLabelComment" 
                                    Text="Your Message"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtMessage" runat="server" 
                                    CssClass="validate[required, maxSize[1000]] txtbox300MComment" MaxLength="10" 
                                    TabIndex="4" TextMode="MultiLine" ValidationGroup="vgContactUs"></asp:TextBox>
                                &nbsp;*<asp:RequiredFieldValidator ID="rfv4" runat="server" 
                                    ControlToValidate="txtMessage"></asp:RequiredFieldValidator>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblVerification" runat="server" Text="Verification Code" CssClass="txtLabelComment"></asp:Label></td>
                            <td class="captchaAlign">
                                <uc1:MyCaptcha ID="MyCaptcha1" runat="server"  />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;</td>
                            <td>
                                <div>
                                    <asp:Button ID="btnSaveComments" runat="server" CssClass="ButtonContactSave" 
                                        onclick="btnSaveComments_Click" Text="Send Message" ValidationGroup="vgContactUs" />
                                <asp:UpdateProgress ID="UpdateProgress1" runat="server" DisplayAfter="0" >
                                    <ProgressTemplate>
                                            <asp:Image ID="imgLoading" runat="server" ImageUrl="~/images/ajax-loader-bar2.gif" /> Processing.....
                                    </ProgressTemplate> 
                                </asp:UpdateProgress>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>  &nbsp;</td>
                             <td>

                            </td>
                        </tr>
                    </table>
    </asp:Panel>
     <asp:Panel ID="pnlContactSuccessMSG" runat="server" Visible="false">
     <table align="center" cellpadding="0" cellspacing="0" width="500px">
            <tr>
                <td height="410px" valign="middle" align="center">
                    <asp:Label ID="lblContactSuccessMSGL1" runat="server" Text="Thank you for contacting Khalaf Al Habtoor Publications."></asp:Label>
                    <br /><br />
                    <asp:Label ID="lblContactSuccessMSGL2" runat="server" Text="You have successfully submitted your inquiry. Based on your query we will accordingly contact you shortly."></asp:Label>
                    <br /><br />
                    <asp:Label ID="lblContactSuccessMSGL3" runat="server" Text="Khalaf Al Habtoor Publications"></asp:Label>
                </td>
                </tr>
    </table>

    </asp:Panel>
     </ContentTemplate>
    </asp:UpdatePanel>   

    <!-- Contact Form -->          
Was it helpful?

Solution

Try to put your update progress outside of update panel

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top