Set CSS Class (ASP.NET)

Adds the CssClass attribute that references the specified style class to the selected controls.

Availability

Available from the context menu or via shortcuts:

  • when one or more controls are selected, provided that at least one CSS class exists in the solution.

Examples

<asp:Button ID="Button1" runat="server" Text="Button" />
<asp:Label ID="Label1" runat="server" Text="Label">MyLabel</asp:Label>
<asp:TextBox ID="TextBox1" runat="server">My text</asp:TextBox>

Result:

<asp:Button CssClass="MyClass" ID="Button1" runat="server" Text="Button" />
<asp:Label CssClass="MyClass" ID="Label1" runat="server" Text="Label">MyLabel</asp:Label>
<asp:TextBox CssClass="MyClass" ID="TextBox1" runat="server">My text</asp:TextBox>

Screenshot

rsSetCSSClass