• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 713
  • Last Modified:

Firefox submits form when pressing enter in text area

I have a text box here in ASP page,

but when I press enter to have more extra lines, the form would actually submit. This only happens in Firefox. It's fine on IE.

Does anyone know how to fix that?

<asp:TextBox ID="txbMessage" runat="server" MaxLength="2000" width="240px" Rows="10" TextMode="MultiLine" />
0
jtcy
Asked:
jtcy
2 Solutions
 
kevp75Commented:
use a textarea instead
0
 
jtcyAuthor Commented:
It's asp.net, we can only use textbox
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
Lee SavidgeCommented:
Hi,

This is because ASP.NET pages have the submit button as the default action for the page. There is a way to override it. I have some code somewhere. I'll get back to you.

Regards,

Lee
0
 
Michel PlungjanIT ExpertCommented:
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now