<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="UsingCSS" %>
Using CSS
File: Default.aspx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class UsingCSS : System.Web.UI.Page
{
protected void drpParagraph_SelectedIndexChanged(object sender, EventArgs e)
{
if (drpParagraph.SelectedIndex > 0)
{
labOne.Style["text-transform"] = drpParagraph.SelectedValue;
labTwo.Style["text-transform"] = drpParagraph.SelectedValue;
}
}
protected void drpPull_SelectedIndexChanged(object sender, EventArgs e)
{
if (drpPull.SelectedIndex > 0)
labPullQuote.CssClass = drpPull.SelectedValue;
}
}