“登录”页面中的“更新进度”不起作用
本文关键字:更新进度 不起作用 更新 登录 | 更新日期: 2023-09-27 18:20:01
我在登录页面中使用更新进度。在这里,当用户点击btnLogg时,它会验证用户并插入一些数据库,最后重定向到主页。我在项目的其他页面中使用了相同的更新进度,它运行良好,但在这个页面中它不起作用。请告诉我我在这里犯了什么错误。
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Employee Quotient</title>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type" />
<link href="../Styles/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
try {
window.history.forward();
function noBack() { window.history.forward(); }
} catch (err) { }
</script>
</head>
<body onload="noBack();" onpageshow="if (event.persisted) noBack();" onunload="">
<form id="MyForm" method="post" runat="server">
<asp:ScriptManager ID="ScriptManger1" runat="server" EnablePartialRendering="false" />
<asp:UpdatePanel runat="server" ID="updLogin">
<ContentTemplate>
<div id="container">
<div id="header">
<div id="logo">
<div id="Div1">
<h1 style="color: White;">
EQ
</h1>
</div>
</div>
<div class="topright">
<table>
<tr>
<td height="15px">
<strong></strong>
</td>
</tr>
<tr>
<td>
<asp:TextBox ID="txtUserID" runat="server" ToolTip="Employee Code" Font-Names="Calibri"
Font-Size="12px"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="TBWE2" runat="server" TargetControlID="txtUserID"
WatermarkCssClass="WaterMarkedTextBox" WatermarkText="ECode" />
</td>
<td>
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password" ToolTip="Password"
Font-Names="Calibri" Font-Size="12px"></asp:TextBox>
<ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server"
TargetControlID="txtPassword" WatermarkCssClass="WaterMarkedTextBoxPSW" WatermarkText="*" />
</td>
<td>
<asp:Button ID="btnLogin" runat="server" CssClass="buttonlogint" OnClick="btnLogin_Click"
Text="Login" />
</td>
</tr>
<tr>
<td>
<asp:HyperLink ID="HyperLink1" runat="server" ForeColor="#6666FF" NavigateUrl="~/Account/ForgotPassword.aspx"
Style="color: White; font-family: calibri; font-size: 10pt; background-color: transparent;">Forgot Password</asp:HyperLink>
</td>
<td width="200px">
<asp:Label ID="lblError" runat="server" Font-Bold="true" Text="Password " ForeColor="White"
Visible="false" />
</td>
</tr>
<tr>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtUserID"
ErrorMessage="* UserID can't be left blank" Font-Bold="false" Style="display: none;
font-family: Calibri" />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPassword"
ErrorMessage="* Password can't be left blank" Font-Bold="True" Style="display: none;" />
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</div>
</div>
<div id="menulogin">
</div>
<div class="contentplaceholder">
<div id="single-column">
<h1>
  About EQ
</h1>
<p class="justify">
  Your partner in Productivity improvement.</p>
</div>
<div style="height: 515px;">
<h1>
</h1>
<p class="justify">
<strong>   "</strong>          *** More coming up here..keep
watching this space ***         <strong>"</strong>
</p>
</div>
</div>
<div id="footer">
<div id="footer-left">
</div>
<div id="footer-right">
</div>
<div id="footer-content">
<div id="footer-navigation">
</div>
<p>
Copyright © All rights reserved.</p>
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnLogin" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="txtUserID" />
<asp:AsyncPostBackTrigger ControlID="txtPassword" />
</Triggers>
</asp:UpdatePanel>
<div class="divTextAlign">
<asp:UpdateProgress ID="updProgressForLogin" runat="server" DynamicLayout="true" associatedupdatepanelid="updLogin"
>
<ProgressTemplate>
<table border="1px">
<tr>
<td>
<img src="../images/faismall_logo.jpg" alt="" />
</td>
</tr>
<tr>
<td>
<img src="../images/ajax-loader.gif" alt="" />
</td>
</tr>
</table>
</ProgressTemplate>
</asp:UpdateProgress>
</div>
</form>
</body>
</html>
试试这个
<asp:ScriptManager ID="ScriptManger1"
runat="server"
EnablePartialRendering="true" />
而不是这个
<asp:ScriptManager ID="ScriptManger1"
runat="server"
EnablePartialRendering="false" />
我不太确定,但请检查参考名称和拼写是否正常
<asp:UpdateProgress ID="updProgressForLogin" runat="server" DynamicLayout="true" associatedupdatepanelid="updLogin"
>