System.Web.UI.IStyleSheet.CreateStyleRule Method

When implemented by a class, creates a style rule for the specified document language element type, or selector.

Syntax

public void CreateStyleRule (System.Web.UI.WebControls.Style style, IUrlResolutionService urlResolver, string selection)

Parameters

selection
Documentation for this section has not yet been entered.
style
The style rule to be added to the embedded style sheet.
urlResolver
An System.Web.UI.IUrlResolutionService-implemented object that contains the context information for the current location (URL).

Remarks

The IStyleSheet.CreateStyleRule(System.Web.UI.WebControls.Style, IUrlResolutionService, string) method creates a style rule for the specified selector. Multiple style rules can be created for the same selector.

If urlResolver is set to null, the URL of the current System.Web.UI.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 ASP.NET AJAX Overview.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0