Login.InstructionText Proprietà

Definizione

Ottiene o imposta il testo di istruzioni di accesso per l'utente.

public:
 virtual property System::String ^ InstructionText { System::String ^ get(); void set(System::String ^ value); };
public virtual string InstructionText { get; set; }
member this.InstructionText : string with get, set
Public Overridable Property InstructionText As String

Valore della proprietà

Testo di istruzioni di accesso da visualizzare all'utente. Il valore predefinito è Empty.

Esempio

Nell'esempio di codice seguente viene usata la InstructionText proprietà per inserire il testo dell'istruzione nel Login controllo.

<%@ 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>
<%@ Page Language="VB" 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>

Commenti

La InstructionText proprietà contiene istruzioni per gli utenti che accedono al sito Web. Questo testo viene visualizzato nel Login controllo, seguendo il titolo.

Se la InstructionText proprietà è impostata su Empty, nessun testo di istruzione è disponibile per l'utente.

Il valore di questa proprietà, quando impostato, può essere salvato automaticamente in un file di risorse usando uno strumento di progettazione. Per altre informazioni, vedere LocalizableAttributee Globalizzazione e Localizzazione.

Si applica a

Vedi anche