Is it semantically valid for wrapping all tags in a form tag - ASP.net

I am not new to ASP.net. In fact, I do not even study it. But recently, I rated some websites and saw that it was awful <form runat="server" ..>, which wraps the entire page and contains all the other tags. Question: Is this valid HTML? This is 2012 and speaks of the semantic network, accessible network, etc. Hot. What do you think about this?

+3
source share
2 answers

This is syntactically correct HTML. But I agree that this is an "obsolete" form, some hidden fields, etc. Like a viewstate. It can also be quite cumbersome to work if you want to use more forms on this page (using jQuery fi).

Take a look at ASP.Net MVC, it solves the problem. You have full control over the HTML and don’t need a form tag around the page. It does not use asp.net server controls.

+5
source

the HTML5 specification is not too restrictive and allows most elements to nest inside the form, but makes state

A form element is a set of form-related elements, some of which can represent editable values ​​that can be submitted to the server for processing.

, , , .

+1

All Articles