0

I am migrating an Asp.Net 2.0 WebSite to an Asp.Net MVC 2.0 Application. In the Asp.Net WebSite Themes and skin features are used for customizing UI.

I would like to handle this in Asp.Net MVC 2.0. Is there a good way to migrate the Themes and Skins in Asp.Net MVC 2.0.

EDIT: I have looked into some of the solutions on the net and other Stackoverflow questions. But the solution suggested are to create Views/Master pages for each Themes which looks like to me as a violation of DRY principal.

1 Answer 1

2

ASP.NET MVC does not natively handle themes. It is designed to product clean HTML that you can apply stylesheets to. Themes work on controls, MVC has no concept of controls.

This question has been asked before and there are some workarounds: Asp.Net MVC Themes, how to?

Sign up to request clarification or add additional context in comments.

1 Comment

@Amitabh. Good point about the DRY principle. I'd suggest the cleanest way to go about this is to create stylesheets (some shared, some dependent on user configuration) and swap the configurable ones programmatically - <link rel="stylesheet" type="text/css" href="<%= Model.SelectedStyleSheet %>"/> Check out Mauricio Scheffer's answer on that linked question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.