Hello,
I have a simple web form with just one WebTextEdit control on it. When the 'Enter' key is pressed inside the WebTextEdit control, the entire web form posts back.
However if I put two WebTextEdit controls on the web form, when the Enter key is pressed inside a WebTextEdit control, the web form doesn't postback anymore ??
That's crazy !
I use Infragistics WebDataInput Version=7.3.20073.1049
Any help is highly appreciated. Please look at the web form, it's very simple:
<%@ Register Assembly="Infragistics2.WebUI.WebDataInput.v7.3, Version=7.3.20073.1049, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" Namespace="Infragistics.WebUI.WebDataInput" TagPrefix="igtxt" %> <html> <head runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <igtxt:webtextedit id="WebTextEdit1" runat="server" style="z-index: 100; left: 64px; position: absolute; top: 56px"></igtxt:webtextedit> <%--uncomment the control below and the web form won't Postback anymore when Enter key is pressed ?? --%> <%-- <igtxt:webtextedit id="WebTextEdit2" runat="server" style="z-index: 100; left: 64px; position: absolute; top: 156px"></igtxt:webtextedit>--%> </div> </form> </body> </html>
</html>
Hi,
WebTextEdit has nothing to do with that postback. That is default behavior of most browsers. It will happen with any <input>.
WebTextEdit has a special property to disable that feature of browser. So, you may use HideEnterKey=true
Thank you very much for your answer however I'm not sure that you have understood the problem.
How can you explain, please read again:
- when the web form contains just one Infragistics control, there is a PostBack when press Enter
- when the web form contains two Infragistics controls, there is no PostBack when press Enter
Please do following:
1. Replace WebTextEdit by asp:TextBox (you should get postback on enter)2. Replace 2 WebTextEdits by 2 aspx:TextBoxes (you should not get postback on enter)3. Submit a bug to Microsoft about "crazy PostBack" of asp:TextBox
Thanks for note about HideEnterKey as I was about to ask the same question.
Cheers, Rob.
All right, now I see your point. Thank you for taking the time to answer.