Export (0) Print
Expand All

Login.InstructionText Property

Gets or sets login instruction text for the user.

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

public virtual string InstructionText { get; set; }

Property Value

Type: System.String
The login instruction text to display to the user. The default is Empty.

The InstructionText property contains instructions for users logging in to the Web site. This text is displayed in the Login control, following the title.

If the InstructionText property is set to Empty, no instruction text is available to the user.

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 uses the InstructionText property to insert instruction text in the Login control.

<%@ Page Language="C#" AutoEventWireup="False"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>ASP.NET Example</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:Login id="Login1" runat="server" 
            InstructionText="Enter your user name and password to log in.">
        <InstructionTextStyle Font-Bold="True" ForeColor="#E0E0E0" BackColor="Gray"></InstructionTextStyle>
        </asp:Login>
    </form>
</body>
</html>

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0
Show:
© 2015 Microsoft