I have a link button on my master page and cannot find how to change the text.
I thought it would be simple, but it wont change.
It is still coming up with Log In,
But i want to change it to Site Admin.
Here is my HTML
<td class="loginDisplay"><asp:HyperLink ID="LnkUserName" runat="server" Text="" OnClick="LnkUserName_Click"></asp:HyperLink> [ <asp:LinkButton ID="lnkStatus" runat="server" OnClick="lnkStatus_Click"></asp:LinkButton> ]
Here is my code behind
protected void Page_Load(object sender, EventArgs e) { if (Session["UserName"] == null) { lnkStatus.Text = "Site Admin"; LnkUserName.Text = ""; LnkUserName.Visible = false; NavigationMenu.Items.Remove(NavigationMenu.FindItem("Edit Conetent")); NavigationMenu.Items.Remove(NavigationMenu.FindItem("Manage Portfolio")); } else { lnkStatus.Text = "Log Out"; LnkUserName.Text = Session["UserName"].ToString(); LnkUserName.Visible = true; } } protected void lnkStatus_Click(object sender, EventArgs e) { Session.Clear(); Session.Abandon(); Response.Redirect("~/Account/Login.aspx"); }