Reputation: 393
When I create a new page in asp.net and try to include the master page, I cannot view the designer part as it shows an error : "Master Page Error".
Although the page runs without any errors, designing the page becomes difficult as I can't see the design. I can only view the source part of the page. This is very difficult for me to design my page properly.
Actually my master page is in another folder. Does it make any problem?
Upvotes: 1
Views: 3952
Reputation: 175
If you have comments on your master page and there's a % in one of them, remove the % from your code and try again.
Upvotes: 1
Reputation:
Saw this on another post and it fixed it for me. Its crap and its a total hack, but it worked for me. Remove all # symbols from your master page. Problem is, I NEED these in my markup. It all worked fine in VS2005. Every page that had its own master page worked fine. It gave me the Master Pager Error - fix it in code view error when I opened it in VS2008. Took out the # symbols and Voila!, went right to design view in VS2008.
Upvotes: 1
Reputation: 1772
Another folder is not a problem.
You can try to make a new page and select masterpage on creation. Probably the code in which you are referring to the master page is somehow corrupt.
Check if that works and if so alter the reference of the page giving the error. Still giving an error after that, then alter your question with the page source so people can see what's going wrong.
Upvotes: 1
Reputation: 25258
Are you running the code locally or on a server? If on a server, make sure it has the same version of the .Net framework that you are developing on in visual studio.
Upvotes: 1
Reputation: 46415
Can you view design view on the master page?
Do you have double nested master pages - these do not work.
Upvotes: 0