开发者

Design Page cannot be viewed!

In Visual Studio 2008, while editing the web page, it is displaying some error and I cannot design my page开发者_运维技巧 in design view, I can do only in Source code. It is showing the following error in design view...

Master Page Error 'The Page Contains Markup that is not valid when attached to a master page Correct the problem in Code View'

Wat is the problem? Whr Should I change ?


Ok, you've got a master page and a content page and when you put the two together you get an error.

If the error isn't obvious you have to work to a point where you can identify what's caused the error - debugging but of pages rather than code.

  1. Create a new page that uses the same master page with no content - does that work? If so then the Master Page is probably not the issue.
  2. Now add the elements in your failing page one at a time to your new page - as close as you can manage to cutting and pasting from one to the next but one change at a time. At some point you should see the error arise in the new page - and at that point you should either be able to fix it or will be able to ask a more specific question about why it doesn't work.

It is the case that designers in VS can just gets themselves tied in knots - but there's usually an underlying cause.


The problem is that your markup in invalid. Fix it.

You likely have an open tag, improperly nested tag, or malformed asp tag.


The problem is that you have edited the source code in such a way that it can no longer be shown in the designer.

Try undoing the latest change that you've made to see if that fixes the problem.

Check too to make sure that you have no <form>, <html>, <body> or <contentplaceholder> tags in your page. These will already be present in the master page, so there's no need for them in the sub-page.


In SharePoint designer, when you insert a MasterPage in customized form, you get this error.

If you remove the < script / > tag,

it works fine for me. Hope that will work for you too.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜