I have a partial view (Partial.ascx
), two master pages(Master1.Master
and Master2.Master
) and two Views(Page1.aspx
and Page2.aspx
) in my asp.net mvc (C#) application. I have referred different style sheet for each master page.
When i show the partial view (Partial.ascx
) as thickbox in View(Page1.aspx
) whose Master page is Master1.Master
, i need to overwrite the styles of elements inside the thickbox with style sheet referring to Master2.Master
, without affecting the styles of the Page1.aspx
elements.
I have tried like:
$("link[href*='style1.css']").remove();
But the problem with this query is it reflects in Page1.aspx
View, which when i close the thickbox or in the shadow view of the page, the styles of that page are vanished.
How can overwrite the style sheet of elements inside a thickbox using jquery without affecting the main View elements?