Login.InstructionText Propriété

Définition

Obtient ou définit le texte d'instruction de connexion pour l'utilisateur.

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

Valeur de propriété

Texte d'instruction de connexion à afficher à l'attention de l'utilisateur. La valeur par défaut est Empty.

Exemples

L’exemple de code suivant utilise la InstructionText propriété pour insérer le texte d’instruction dans le Login contrôle.

<%@ 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>

Remarques

La InstructionText propriété contient des instructions pour les utilisateurs qui se connectent au site web. Ce texte s’affiche dans le Login contrôle, en suivant le titre.

Si la propriété a la InstructionTextEmptyvaleur , aucun texte d’instruction n’est disponible pour l’utilisateur.

La valeur de cette propriété, lorsqu’elle est définie, peut être enregistrée automatiquement dans un fichier de ressources à l’aide d’un outil de concepteur. Pour plus d’informations, consultez LocalizableAttributeglobalisation et localisation.

S’applique à

Voir aussi