Share via


Login.InstructionText Properti

Definisi

Mendapatkan atau mengatur teks instruksi masuk untuk pengguna.

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

Nilai Properti

Teks instruksi masuk untuk ditampilkan kepada pengguna. Default adalah Empty.

Contoh

Contoh kode berikut menggunakan InstructionText properti untuk menyisipkan teks instruksi dalam Login kontrol.

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

Keterangan

Properti InstructionText berisi instruksi untuk pengguna yang masuk ke situs Web. Teks ini ditampilkan dalam Login kontrol, mengikuti judul.

InstructionText Jika properti diatur ke Empty, tidak ada teks instruksi yang tersedia untuk pengguna.

Nilai properti ini, ketika diatur, dapat disimpan secara otomatis ke file sumber daya dengan menggunakan alat perancang. Untuk informasi selengkapnya, lihat LocalizableAttribute dan Globalisasi dan Pelokalan.

Berlaku untuk

Lihat juga