I have a website on which there is a need for customization, which means i need to change the theme of the page depending on the option selected by the user. I need to know how to change the css file which is rendered through Layout.cshtml according to the users selection.
These are the two css file in my layout.cshtml
@Styles.Render("~/Content/style1.css") -> Theme 1 @Styles.Render("~/Content/style2.css") -> Theme 2
I have assign two links to click in order to change the css file in my home webpage(Link 1-Theme 1,Link 2- Theme 2) but i don't know how to change it.
My initial idea was to have two links and when the link is pressed it will be sent to a controller from which it will be redirected to the page after selecting the appropriate css file from layout.cshtml depending on the users selection using an if condition, i guess that idea is not possible.
Please let me know the best way to do this since i need to implement this solution in my website soon.