How to Implement Dynamic CSS File in ASP.NET
at ASPX page put this
add this in title tag
and Page Load Event pagename.aspx.cs
if (!Page.IsPostBack)
{
if (Request.Browser.Browser == "IE" && Request.Browser.Version == "7.0") //&& Request.Browser.Version = "7")
{
lnkcss.Attributes.Add("href", "style/styleIE7.css");
}
else
{
lnkcss.Attributes.Add("href", "style/style1.css");
}
}
add this in title tag
and Page Load Event pagename.aspx.cs
if (!Page.IsPostBack)
{
if (Request.Browser.Browser == "IE" && Request.Browser.Version == "7.0") //&& Request.Browser.Version = "7")
{
lnkcss.Attributes.Add("href", "style/styleIE7.css");
}
else
{
lnkcss.Attributes.Add("href", "style/style1.css");
}
}
Comments
Post a Comment