Mobile app version of vmapp.org
Login or Join
Sue5673885

: How can we fix the emtpy form action error reported by HTML5 validators for default ASP.NET 4 pages, and will this affect SEO? We are in the process of upgrading our ASP.NET 4 website from

@Sue5673885

Posted in: #AspNet #Forms #Html5 #Serps

We are in the process of upgrading our ASP.NET 4 website from XHTML 1.0 to HTML 5. The <form> tag is generated automatically as it is ASP.NET, and it looks like:

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


Almost on all pages of our website we do not have any special button that should lead to an action, so it's OK to have the action attribute empty (action=""). However, every HTML 5 validator tells us that the action attribute should not be empty.

How can we overcome this problem without changing the existing website functionality? Or, maybe, we can live with that and this will never affect such serious things as Google SERP positions, etc...?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sue5673885

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

Include this in your web.config file: <httpRuntime targetFramework="4.5"/>

According to Microsoft here (at the bottom of the page):


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.


In regards to this affecting your Google SERP, as indicated here according to Matt Cutts:


Google doesn’t look at site/page validation when determining ranking.


What you might be concerned with is if your users will have issues with their browsers, so test your page(s) with as many browsers you can.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme