I've checked my website html validation in w3.org and got this error
Bad value for attribute action on element form: Must be non-empty.
but my form is asp.net server-side form and I can't set action atribute.
How can I solve this error?
I've checked my website html validation in w3.org and got this error
Bad value for attribute action on element form: Must be non-empty.
but my form is asp.net server-side form and I can't set action atribute.
How can I solve this error?
This is an old post, but for future reference in ASP.NET one can do the following to avoid blank action attributes:
<form action="#" runat="server">
This will validate with W3C and does not require you to do any special coding to detect the page url you are currently on.
form1.Action = Request.Url.AbsoluteUri;
this is working for me
Omit the attribute action
. According to HTML5 drafts, it is not required, but if present, its value must be non-empty. Reference: WHATWG HTML5 draft, description of action
attribute.
© 2022 - 2024 — McMap. All rights reserved.