Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
LoginImageUrl Property

LoginStatus.LoginImageUrl Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets the URL of the image used for the login link.

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in system.web.dll)

public virtual string LoginImageUrl { get; set; }
/** @property */
public String get_LoginImageUrl ()

/** @property */
public void set_LoginImageUrl (String value)

public function get LoginImageUrl () : String

public function set LoginImageUrl (value : String)

Property Value

A string containing the URL of the image used for the login link. The default is Empty.

The LoginImageUrl property contains the location of the image used for the login link. The LoginText property is used as the alternative text for the image.

If LoginImageUrl is empty, the LoginText property is rendered as the link.

The following code example shows how to set the LoginImageUrl property to a specific image.

<%@ Page Language="C#" AutoEventWireup="false"%>
<script runat="server">

    void Button1_Click(Object sender, EventArgs e) {
        LoginStatus1.LoginImageUrl = String.Empty;
         Button1.Visible = false;
    }

</script>
<html>
<head>
</head>
<body>
    <form runat="server">
        <p>
            <asp:LoginStatus id="LoginStatus1" runat="server" 
                LoginImageUrl="Images\Login.png" />
        </p>
        <p>
            <asp:Button id="Button1" onclick="Button1_Click" runat="server" 
               Text="Use Text" />
        </p>
    </form>
</body>
</html>

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2015 Microsoft