Amass

IE + ASP.Net forms submit bug

November 29th, 2007 Luke

I recently build a quick textbox-based login page, which worked fine - until we tested it under IE and the form wasn’t submitting properly. If a user entered text into the textbox and pushed enter(under IE), instead of submitting the form it would just refresh the page(although it would post a postback). It took a friend and I a little while to figure out, but we eventually managed (through some googling) to resolve the issue. If you add this:

<input type="text" style="display:none" />

To your form, IE will properly submit the form.

Who would have thought?