Note that there are some explanatory texts on larger screens.

plurals
  1. POw3c validation issues
    text
    copied!<p>im confused, the w3c validation service seems to be saying that asp.net cannot legally render a hidden field inside a form tag on the page, have a look at this ...</p> <p><a href="http://validator.w3.org/check?uri=http%3a%2f%2fmotcombegarage%2eco%2euk%2f" rel="nofollow">http://validator.w3.org/check?uri=http%3a%2f%2fmotcombegarage%2eco%2euk%2f</a></p> <p>from what i can tell it seems to be saying that the following code sample is invalid markup WTF !!!</p> <pre><code>&lt;html&gt; &lt;head&gt; ... header stuff ... &lt;/head&gt; &lt;body&gt; &lt;form method="post" action="" id="ctl01"&gt; &lt;div class="aspNetHidden"&gt; &lt;input type="hidden" name="ctl09_HiddenField" id="ctl09_HiddenField" value="" /&gt; &lt;input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTY1NzEyODQ1M2RkJPtW5VtaL7LPuSxnn1JM1yVnOeGAovb8b4b3KShHy4M=" /&gt; &lt;input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAwKt17cxAr+s9MgFAqjXzJsHz7KyzLpZjYtTK89blY7GgKAElK/5syvVNn4h7rVehcQ=" /&gt; &lt;/div&gt; ... other code ... &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>This presents 2 problems for me if the code is in fact invalid:</p> <ol> <li>This code is generated by the .net framework for handling postbacks so editing it could be a problem</li> <li>i have no idea what the valid context for a form field should be (lolz)</li> </ol> <p>Is this a bug or have i done something wrong ???</p> <p>EDIT: As pointed out by Peter O below I added the missing div tag in my markup ... comparing this to the markup that the validator uses shows that this div whilst present in the markup is apparently not worth validating ... so that kinda changes the question to ... why is it ignoring that div ? ...</p> <p>Seems a bit odd that you can't put an input tag inside a form tag directly though ... surely thats the point of a form tag, to contain input tags ??</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload