IStyleSheet::CreateStyleRule Method
When implemented by a class, creates a style rule for the specified document language element type, or selector.
Assembly: System.Web (in System.Web.dll)
void CreateStyleRule(
Style^ style,
IUrlResolutionService^ urlResolver,
String^ selector
)
Parameters
- style
- Type: System.Web.UI.WebControls::Style
The style rule to be added to the embedded style sheet.
- urlResolver
- Type: System.Web.UI::IUrlResolutionService
An IUrlResolutionService-implemented object that contains the context information for the current location (URL).
- selector
- Type: System::String
The part of the HTML page affected by the style.
The CreateStyleRule method creates a style rule for the specified selector. Multiple style rules can be created for the same selector.
If urlResolver is set to nullptr, the URL of the current Page instance is used.
Note |
|---|
Adding or modifying styles or style rules programmatically during asynchronous postbacks is not supported. When you add AJAX capabilities to an ASP.NET Web page, asynchronous postbacks update regions of the page without updating the whole page. For more information, see Microsoft Ajax Overview. |
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note