Login.InstructionTextStyle Propiedad

Definición

Obtiene una referencia a un objeto TableItemStyle que define la configuración para el texto de instrucciones del control Login.

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

Valor de propiedad

Una referencia al TableItemStyle que contiene la configuración de estilo del texto de instrucciones del control Login.

Atributos

Ejemplos

En el ejemplo de código siguiente se establece el texto de instrucción y el color de fondo del texto de instrucción estableciendo las propiedades del TableItemStyle objeto al que hace referencia la InstructionTextStyle propiedad .

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

Comentarios

La InstructionTextStyle propiedad define la apariencia del texto de instrucción en el Login control . Esta propiedad es de solo lectura; sin embargo, puede establecer las propiedades del TableItemStyle objeto que devuelve. Puede establecer estas propiedades mediante declaración en el formulario Property-Subproperty, donde Subproperty representa una propiedad de la TableItemStyle clase (por ejemplo, InstructionTextStyle-ForeColor). Puede establecer la propiedad mediante programación en el formulario Property.Subproperty (por ejemplo, InstructionTextStyle.ForeColor).

Entre las opciones comunes se incluyen el color de fondo personalizado, el color de texto y las propiedades de fuente. La InstructionTextStyle propiedad define la apariencia de la InstructionText propiedad .

La configuración de estilo de la InstructionTextStyle propiedad se combina con la configuración de estilo del Login control. Cualquier configuración realizada en la InstructionTextStyle propiedad invalida la configuración correspondiente en las propiedades del Login control.

La configuración invalida InstructionTextStyle las siguientes Login propiedades de estilo:

Cuando se usan plantillas para definir la apariencia del Login control, la InstructionTextStyle propiedad no tiene ningún efecto.

Se aplica a

Consulte también