Login.InstructionText Vlastnost

Definice

Získá nebo nastaví text instrukce přihlášení pro uživatele.

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

Hodnota vlastnosti

Text instrukce pro přihlášení, který se zobrazí uživateli. Výchozí formát je Empty.

Příklady

Následující příklad kódu používá InstructionText vlastnost k vložení textu instrukce do Login ovládacího prvku.

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

Poznámky

Vlastnost InstructionText obsahuje pokyny pro uživatele, kteří se přihlašuje k webu. Tento text se zobrazí v ovládacím Login prvku za názvem.

InstructionText Pokud je vlastnost nastavená na Empty, není uživateli k dispozici žádný text instrukce.

Hodnota této vlastnosti, pokud je nastavená, se dá automaticky uložit do souboru prostředků pomocí nástroje návrháře. Další informace najdete v tématech LocalizableAttributeGlobalizace a lokalizace.

Platí pro

Viz také