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");
}
}

Comments

Popular posts from this blog

How to publish iPhone app on App store using Xamarin or visual studio.

DMA - A safe way to migrate SQL Server database objects