kiev
kiev

Reputation: 2070

Unexpected end of file looking for </form> tag

i put a comment in my aspx page inside javascript tag which said

//add back to <form> tag

And I promptly got a .NET parser error

Unexpected end of file looking for </form> tag.

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237

It's very strange that it considered a js comment as a tag... Any ideas why?

Upvotes: 1

Views: 9847

Answers (2)

onof
onof

Reputation: 17377

Don't use < or >. Use XML entities instead:

//add back to &lt;form&gt; tag

As alternative, use the asp.net comment tag:

<!-- // comment here -->

Upvotes: 1

Bruno Portis
Bruno Portis

Reputation: 160

It looks like thats an error with the .NET parser, you could try to remove the '<>' from the comment, or close the that in the same comment or in another comment. Waht abou the runat server tags ?

Upvotes: 0

Related Questions