Tuesday, 15 September 2015

javascript - Skipping some css files in HTML Master page (.net): is it possible? -



javascript - Skipping some css files in HTML Master page (.net): is it possible? -

i have site 6 css files linked, in page need utilize 3 css files. developers using master page in .net, don't want alter that. so, question is: there way can skip few css files linked?

another solution (doesn't need jquery) adding configuration property master page this:

site.master.cs

private bool _includeothercss = true; public bool includeothercss { { homecoming _includeothercss; } set { _includeothercss = value; } }

site.master (head section)

<%if (includeothercss) { %> <link href="~/styles/site.css" rel="stylesheet" type="text/css" /> <%} %>

other page:

protected void page_init(object sender, eventargs e) { (master sitemaster).includeothercss = false; }

javascript html .net css

No comments:

Post a Comment