我使用 AjaxModalPupupExtender 时出现问题。当我尝试刷新文本框时出现此错误:
"解析器错误消息:键入' AjaxControlToolkit.ToolkitScriptManager' 没有名为' script'。"
的公共财产
<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
<script type="text/javascript">
function DoCancel() {
$get('<%=txtEmail.ClientID%>').value = "";
$get('<%=txtPassword.ClientID%>').value = "";
}
</script>
</cc1:ToolkitScriptManager>
<asp:LoginStatus ID="MasterLoginStatus" runat="server" LogoutPageUrl="Home.aspx" LogoutAction="Redirect" />
<cc1:ModalPopupExtender ID="mpe" runat="server" PopupControlID="pnlPopupLogin" TargetControlID="MasterLoginStatus"OkControlID="btnLogin" CancelControlID="lnkButtonClose" OnCancelScript="DoCancel()" BackgroundCssClass="modalBackground">
</cc1:ModalPopupExtender>
<asp:Panel ID="pnlPopupLogin" runat="server" CssClass="modalPopup" Style="display: none">
<div class="header">
Sign in
<asp:LinkButton ID="lnkButtonClose" runat="server" CssClass="boxclose" OnClick="lnkButtonClose_Click"/>
</div>
<div class="body">
Username / Email<br />
<asp:TextBox ID="txtEmail" runat="server" CssClass="twitterStyleTextbox" placeholder="Username/Email" /> <br />
Password <br />
<asp:TextBox ID="txtPassword" runat="server" CssClass="twitterStyleTextbox" placeholder="Password" /> <br />
</div>
<div class="footer">
<asp:Button ID="btnLogin" runat="server" Text="Login" CssClass="button" />
</div>
</asp:Panel>