Preventing default button to react when in a multi-row textbox

J

Jon F

Hi everyone,

I have a Panel control in which I have set the DefaultButton-property to a
save-button. In this panel there's a DetailsView and, in this panel, a
TextBox control with TextMode="MultiLine" (wrapped in a
<EditItemTemplate>).

The textbox should thus allow for creating a new line using the <Enter>
key. However, if the textbox has the focus and you hit <Enter>, the
save-button is triggered instead. Even thought I can quickly press <ESC>
and then <Enter> in order to insert a new line into the textbox, the
save-button will be triggered on the server.

Is there any way to work around this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top