单击保存按钮时,我的联系我们表单不显示 UpdateProgress。
以下是联系表格的部分代码。代码片段是使用母版页的 Contact.aspx 页面的一部分。类似的代码适用于不使用母版页的其他页面。我不确定我在哪里做错了我尝试在更新面板中更改 UpdateProgress 的位置,但没有做任何事情。
页面工作正常,除了显示更新进度。
我还在文件后面的代码上延迟了 3 部分
<!-- 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>
*
<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>
*
<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>
*
<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>
*
<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>
*<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>
*<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>
</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> </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 -->