This documentation is archived and is not being maintained.

LoginStatus.LoginText Property

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

Gets or sets the text used for the login link.

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

public virtual string LoginText { get; set; }
/** @property */
public String get_LoginText ()

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

public function get LoginText () : String

public function set LoginText (value : String)

Property Value

A string displayed as the login link. The default is "Login".

The LoginText property is displayed as the link text when the LoginImageUrl property is empty.

When the LoginImageUrl property contains a link, the LoginText property is used as the alternative text for the image.

The value of this property, when set, can be saved automatically to a resource file by using a designer tool. For more information, see LocalizableAttribute and ASP.NET Globalization and Localization.

The following code example shows how to set the LoginText property.

<%@ Page Language="C#" autoeventwireup="False" %>
<script runat="server">

    void Button1_Click(Object sender, EventArgs e) {
        LoginStatus1.LoginText = "Login to our Web site.";
         Button1.Visible = false;

    <form runat="server">
            <asp:LoginStatus id="LoginStatus1" runat="server" 
               LoginText="Login now." />
            <asp:Button id="Button1" onclick="Button1_Click" runat="server" 
               Text="Change Text" />

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