开发者

Validation (ASP.Net): Element 'Content' is missing its closing tag

Morning,

I'm getting the error above when I save my aspx file.

Easy fix I here you say! Simply add <开发者_开发百科/asp:Content> to the end of the code.

That gets rid of the error.... then when I press save Visual Studio DELETES the line of code. I'm guessing there's a problem deeper in the code (some other tag which has not been closed)... but I can't find it!

So there's two questions really!

(1) Why is Visual Studio deleting code I've typed.... (2) Anyone know of a tool I can use to find missing end tags?

Thanks in advance,

Jim

Here is a link to the code


This was the offending item:

<Style Font-Names="MS Reference Sans Serif" Font-Size="9px" />

Thanks for your help guys,

Jim


VS.NET may be having difficulties parsing your file. Try this:

Create a new .aspx page that uses the same master page. Try adding your tag and see if it closes properly. If it does, then we know that VS.NET is still working to some reasonable level.

If that is the case, you can always try adding the markup that breaks to your new page, one step at a time, until you eventually see when the failure occurs.

One idea for a solution may be to simplify your .aspx file. Break down all the stuff that's between your ... tag into separate user controls, a sort of functional decomposition if possible. If it's a VS.NET parsing issue, this may make it easier for VS.NET to understand your code.


A tool to find missing end tags? You can use functions from http://www.dotnetperls.com/xhtml

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜