string appPath = Request.ApplicationPath; if (appPath.Length == 0) appPath = "/"; else if (!appPath.EndsWith("/")) appPath += "/"; String themeDir = Page.Theme; if (themeDir == null || themeDir.Length == 0) themeDir = Page.StyleSheetTheme; String conditionalCode = @"<!--[if IE 6]><link rel='stylesheet' href='" + appPath + @"app_themes/" + themeDir + @"/style.css.ie6' type='text/css' /><![endif]--> <!--[if IE 7]><link rel='stylesheet' href='" + appPath + @"app_themes/" + themeDir + @"/style.css.ie7' type='text/css' /><![endif]--> "; Page.ClientScript.RegisterClientScriptBlock ("".GetType(), "iespecific", conditionalCode);
Friday, 15 February 2013
if IE Conditional CSS using ASP.NET Themes
Labels:
ASP.Net Code
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment