我想通过我的C#后台代码启用/禁用在我的html代码中的“a”标记。我知道如果它是一个按钮,那么我只会使用,xxx.Visible =“false/true”,但我想“一个”标签没有任何后端代码的功能。这里是我有什么,启用/禁用<a>通过c#代码标记
C#:
if (Session["SessionUsersLoginId"] == null)
{
alreadyMemberLabel.Visible = true;
SignInButton.Visible = true;
forgotdButton.Visible = true;
passwordLabel.Visible = true;
passwordTextBox.Visible = true;
Right here should disable visibility for "login_pop" a tags
}
HTML:
<span style="width:32%; float:right;">
<div class="panel">
<a href="#login_form" id="login_pop">Log In</a>
<a href= "AddUsers.aspx" id="login_pop">Sign Up</a>
<span style="width:32%; float:right;">
<asp:Button ID="forgotdButton" CssClass="btn-link forgotPass" runat="server" Height="25px" Text="Forgot Password?"
onclick="forgotdButton_Click" Width="135px" />
</span>
</div>
也许有一种方法来启用/通过ID禁用? 谢谢
' '? –
YK1