Hey guys
In ASP.NET webforms and ASP 3 (Classic ASP), I came across an issue whereby naming your form submit button "submit" would "break things". Below is the rendered HTML:
<input type="submit" name="Submit" value="Submit" id="Submit" />
I say "break things" because I'm not sure exactly why or what happened. But the symptoms usually were that pressing the submit button sometimes did nothing i.e. it just didn't work. But sometimes it did work.
In fact, I just built a quick one page test with the the code below, and submitting worked fine:
<form id="form1" runat="server">
<div>
<asp:TextBox ID="txtTest" runat="server" />
<asp:Button ID="Submit" runat="server" Text="Submit" />
</div>
</form>
But, in the past, this problem has arisen, and renaming the button always made the symptom go away.
So, does any HTML/HTTP/Browser expert know of any reason why setting id="submit" on a Submit button would cause any problems?
EDIT
this SO comment seems to suggest "submit" is a reserved keyword. But why would the "id" or "name" attributes intefere with this? And how does this "reserved" keyword get implemented in such a way that would cause conflicts?
thanks again