IE 8 - ASP.NET Form Not Submitted When User Presses Enter

I have a simple form written in asp.net/C# and when I try to press enter, and in the input field of the form does not submit the form for any reason. I applied the fix for the previous error, in which pressing the button just refresh the page without sending the form data, but now pressing the enter button does nothing, the correction is below:

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

Does anyone know of a fix for this or a workaround?

+3
source share
3 answers

I assume that you have a button somewhere on your page, as well as an event handler for it.

( ) Panel ?

.

<asp:Panel id="pnlMyForm" runat="server" DefaultButton="btnMyButton">
<asp:textbox id="txtInput" runat="server" />
<asp:Button id="btnMyButton" text="Submit" runat="server" />
</asp:Panel>
+5

, , (.. ). , - . /.

<form id="form1" runat="server">
    <asp:Panel ID="pnlFormContents" runat="server" DefaultButton="btnSubmit">
        <!-- add some input controls as needed -->
        <asp:Button ID="btnSubmit" runat="server" Text="Submit" OnClick="btnSubmit_Click"/>
    </asp:Panel>
</form>

, ...

+4
0
source

Source: https://habr.com/ru/post/1729593/


All Articles