1

For some reason the text (Log In) inside the HeadLoginView in ASP.NET is being displayed as grey not white and only visible when i hover on it, I want it white and always visible.

What am I doing wrong? Also how/where do I code the signout when a user is logged in?

small screenshot

Code:

<!-- Cart -->
    <div id="cart">
        <asp:LoginView ID="HeadLoginView" runat="server" EnableViewState="false">
                <AnonymousTemplate>
                    [ <a href="~/login.aspx" ID="HeadLoginStatus" runat="server">Log In</a> ]
                </AnonymousTemplate>
                <LoggedInTemplate>
                    Welcome <span class="bold"><asp:LoginName ID="HeadLoginName" runat="server" /></span>!
                    [ <asp:LoginStatus ID="HeadLoginStatus" runat="server" LogoutAction="Redirect" LogoutText="Log Out" LogoutPageUrl="~/"/> ]
                </LoggedInTemplate>
            </asp:LoginView>
        <div class="cl">&nbsp;</div>
        <a href="shoppingCart.aspx" class="cart-link">Your Shopping Cart</a>        
    </div>
    <!-- End Cart -->!
4

2 回答 2

1

Change font color of hyperlink text via CSS attribute.

#cart a
{
  color:white;
}
于 2012-12-21T13:50:57.030 回答
1

There is some CSS throwing off the styles of the links somewhere. You can track this down using IE's developer tools or FireBug in FireFox. You can always style it yourself like @AVD suggested.

Also, with that template and logging out, the LoginStatus generates a logout link and there is code within the LoginStatus control itself to actually perform the logout process.

于 2012-12-21T13:52:47.503 回答