Share via


Login.InstructionTextStyle Properti

Definisi

Mendapatkan referensi ke TableItemStyle objek yang menentukan pengaturan untuk teks instruksi dalam Login kontrol.

public:
 property System::Web::UI::WebControls::TableItemStyle ^ InstructionTextStyle { System::Web::UI::WebControls::TableItemStyle ^ get(); };
[System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)]
public System.Web.UI.WebControls.TableItemStyle InstructionTextStyle { get; }
[<System.Web.UI.PersistenceMode(System.Web.UI.PersistenceMode.InnerProperty)>]
member this.InstructionTextStyle : System.Web.UI.WebControls.TableItemStyle
Public ReadOnly Property InstructionTextStyle As TableItemStyle

Nilai Properti

Referensi ke TableItemStyle yang berisi pengaturan Login gaya teks instruksi kontrol.

Atribut

Contoh

Contoh kode berikut mengatur teks instruksi dan warna latar belakang untuk teks instruksi dengan mengatur properti objek yang direferensikan TableItemStyleInstructionTextStyle oleh properti .

<%@ 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 InstructionTextStyle menentukan tampilan teks instruksi dalam Login kontrol. Properti ini bersifat baca-saja; namun, Anda dapat mengatur properti objek yang TableItemStyle dikembalikannya. Anda dapat mengatur properti ini secara deklaratif dalam formulir Property-Subproperty, di mana Subproperty mewakili properti TableItemStyle kelas (misalnya, InstructionTextStyle-ForeColor). Anda dapat mengatur properti secara terprogram dalam formulir Property.Subproperty (misalnya, InstructionTextStyle.ForeColor).

Pengaturan umum mencakup warna latar belakang kustom, warna teks, dan properti font. Properti InstructionTextStyle menentukan tampilan InstructionText properti .

Pengaturan gaya untuk InstructionTextStyle properti digabungkan dengan pengaturan gaya untuk Login kontrol. Pengaturan apa pun yang InstructionTextStyle dibuat di properti akan mengambil alih pengaturan terkait di properti Login kontrol.

Properti gaya berikut Login ini ditimpa oleh InstructionTextStyle pengaturan:

Saat Anda menggunakan templat untuk menentukan tampilan Login kontrol, InstructionTextStyle properti tidak berpengaruh.

Berlaku untuk

Lihat juga