Suppose we have two Master pages and we want to change them dynamically.
Let the style sheet are:
- blue.master - set background color to Blue
- green.master - set background color to Green
I have added a page with a dropdownlist which list the master pages as option and in the code behind as drop down list selected index changed event response we saved the user selection in the session and in the Page_PreInit event we changed the master page dynamically.