“href”属性具有格式错误的 URL:无法使用前导 .以退出顶部目录上方
本文关键字:退出 顶部 属性 href 有格式 错误 URL | 更新日期: 2023-09-27 18:31:16
我对这个主题做了很多研究,但我无法找到这个问题的任何解决方案。我彻底检查了我的页面,但我无法罚款"../"在我的页面中。需要建议。我在页面上的代码是这样的:
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
CodeFile="PassRecovery.aspx.cs" Inherits="Login_PassRecovery" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<style>
input[type="text"], input[type="password"], input[type="email"], select, textarea {
height: 2em;
background:none;
border-radius:0px;
}
input[type="submit"], input[type="reset"], input[type="button"], .button {
padding: 16px;
line-height:0em;
height:2em;
border-radius:0px;
}
</style>
<div class="container">
<section id="main" class="container" style="padding-top:6em;">
<header>
<h2>Forgot your password?</h2>
<p>No problem, we can send it to you.</p>
</header>
<div class="row" style="width:65%;margin:0 auto;min-height:331px;">
<div class="12u">
<!-- Lists -->
<section class="box">
<div class="row collapse-at-2">
<div class="requiredFieldPrompt 3u" >
Your Email :
</div>
<div class="9u">
<div class="12u">
<asp:TextBox ID="txtEmailAddress" runat="server"></asp:TextBox></div>
<div class="12u"> <asp:RequiredFieldValidator ID="valEmail" runat="server" ErrorMessage="Please Enter your Email address"
ControlToValidate="txtEmailAddress" Display="Dynamic"></asp:RequiredFieldValidator></div>
<div class="12u"> <asp:RegularExpressionValidator ID="valEmailAddress" runat="server" ErrorMessage="Invalid Email Address"
ValidationExpression="'w+([-+.']'w+)*@'w+([-.]'w+)*'.'w+([-.]'w+)*" ControlToValidate="txtEmailAddress"
Display="Dynamic"></asp:RegularExpressionValidator></div>
<br />
</div>
</div>
<div class="12u" style="text-align:center;">
<asp:LinkButton ID="lnkGetUser" runat="server" CssClass="button" Text="Submit" OnClick="lnkGetUser_Click"></asp:LinkButton>
<asp:LinkButton ID="lnkCancel" runat="server" CssClass="button" href="Login.aspx" Text="Back" CausesValidation="false"
OnClick="lnkCancel_Click"></asp:LinkButton>
</div>
<div class="12u" style="text-align: center;">
<h4>
<asp:Label ID="lblMessage" runat="server"></asp:Label></h4>
</div>
<div class="12u" style="text-align:center;">
<asp:LinkButton ID="lnkContinue" runat="server" href="Login.aspx" Text="Sign in to your account"
CausesValidation="false" onclick="lnkContinue_Click"></asp:LinkButton>
</div>
</section>
</div>
</div>
</section>
</div>
</asp:Content>
得到了答案。母版页有问题。我的母版页在主目录中,我正在使用../在上面。谢谢大家。:)