Form action is blank on default document, breaking HTML5 validation - by EvilDr

Status : 

  Accepted<br /><br />
		The product team has accepted this issue and will be determining when the issue will be addressed.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 785585 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 4/25/2013 8:48:39 AM
Access Restriction Public


I know this is officially documented as a breaking change, but I think the result is bad news for all developers trying to learn HTML5 (

When working on a HTML5 site and no page is specified (e.g. www,, the default document renders with an empty form action property, e.g.

<form method="post" action="" id="form1">

This immediately fails HTML5 validation for the default document.  All other documents where the document file name is included in the URL works okay.

To encourage more widespread use of ASP.NET with new developers, surely this is a move in the wrong direction.

I have posted a workaround for anyone stumbling across this page via a search, but feel a more robust solution is required from the framework :-)
Sign in to post a comment.
Posted by Deon [MSFT] on 4/29/2014 at 12:30 PM
Thank you for reporting this issue. This issue has been fixed in Visual Studio 2013. You can install a trial version of Visual Studio 2013 with the fix from:
Posted by EvilDr on 4/30/2013 at 1:50 AM

Thanks, I can confirm this behaviour when <httpRuntime targetFramework="4.5"/> is included in web.config (which it isn't by default).

Could <httpRuntime targetFramework="4.5"/> be included in the web.config template for a new site when this version of the framework is defined? This would avoid less-experienced developers wondering what is going on!
Posted by Damian [MSFT] on 4/29/2013 at 3:19 PM
This behavior was changed again in ASP.NET 4.5 so that the action attribute is rendered with a value of "./". The application must however specfically target 4.5 in its web.config via the httpRuntime element.
Posted by Microsoft on 4/26/2013 at 1:20 AM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Macy [MSFT] on 4/25/2013 at 8:54 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(