views:

19

answers:

1

I noticed a behaviour in Visual Studio that the design tab for aspx page does not work if I use a dynamic master page using a base page. I dynamically set the master page to implement theming. It shows a master page error and says "The page has controls that require a Master Page reference, but none is specified".

Is there any solution? Or any work around?

I currently set the base/master page to a default master page in the page for myself and work on the page. Once I complete the page, I remove the master page attribute. I wanted to know if some better method is available.

A: 

The "workaround" is to style while debugging/browsing the page. The designer can't possibly know what your master page is if you are setting it dynamically.

TheGeekYouNeed
My query is not about styling. I am talking about adding controls and using the ease of the design view at the time of development. Styling is quite a separate thing.
Kangkan
Styling... location of your controls based on the master ... look and feel of the layout.... it's all in the same realm. Regardless, you won't be able to use the designer if you are dynamically setting the master page from a base page event.
TheGeekYouNeed
So the finishing line is that the design tab can not be used while using dynamically set master page.
Kangkan