[英]Changing button text after signing in to “Sign Out”
I have HTML code of a sign in button: 我有登录按钮的HTML代码:
<a href="Login.aspx" id="signin" runat="server" class="navbar-btn btn-success btn right">
Sign In
</a>
and a C# if statement that checks whether you are connected. C#if语句,用于检查您是否已连接。 If yes, I want to change the button text to
Sign Out
. 如果是,我想将按钮文本更改为
Sign Out
。
I tried to use the id of the HTML button signin
in C# with signin.Attributes
but I don't know how. 我试图在C#中使用带
signin.Attributes
的HTML按钮signin
ID,但是我不知道如何。
signin.InnerText =“退出!”;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.