HtmlHead.StyleSheet Propiedad
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Obtiene una IStyleSheet instancia de que representa las reglas de estilo del HtmlHead control .
public:
property System::Web::UI::IStyleSheet ^ StyleSheet { System::Web::UI::IStyleSheet ^ get(); };
public System.Web.UI.IStyleSheet StyleSheet { get; }
member this.StyleSheet : System.Web.UI.IStyleSheet
Public ReadOnly Property StyleSheet As IStyleSheet
Valor de propiedad
Objeto que representa las reglas de estilo del HtmlHead control .
Ejemplos
En el ejemplo siguiente se muestra cómo agregar mediante programación una regla de estilo incrustada para el elemento HTML body . Este ejemplo forma parte de un ejemplo más grande proporcionado para la HtmlHead clase .
// Add the style rule named bodyStyle to the header
// of the current page. The rule is for the body HTML element.
Page.Header.StyleSheet.CreateStyleRule(bodyStyle, null, "body");
' Add the style rule named bodyStyle to the header
' of the current page. The rule is for the body HTML element.
Page.Header.StyleSheet.CreateStyleRule(bodyStyle, Nothing, "body")
Comentarios
La StyleSheet propiedad devuelve un IStyleSheet que representa las reglas de estilo incrustadas en el HtmlHead control .
Nota:
No se admite la adición de estilos o reglas de estilo mediante programación durante postbacks asincrónicos. Al agregar funcionalidades de AJAX a una página web de ASP.NET, las devoluciones de entrada asincrónicas actualizan las regiones de la página sin actualizar toda la página. Para obtener más información, consulte Introducción a Microsoft Ajax.