I have a WebDialogWindow with several controls. It is on a page that is not the start page. When a user types information into a control in the dialog window and then presses 'Enter' the dialog is closed and the user is returned to the start page of the application. Has anyone seen this before?
Hello Peggy,I have created a sample reproducing your scenario. Sample has Default page which contains a hyperlink redirectin you to Second page. On Second page there are a WebDialogWindow containing three TextBox controls in it. I tried the following:1. Start the sample which loads Default page.2. Click on the hyperlink which redirects me to the Second page
3 Type something inside any of the TextBoxes and press Enter4 Nothing happened – I was not redirected on the Default page.Please take a look at the sample and modify it or create a new one reproducing the behavior you are facing. I used for test IE 9 – please point if this issue is occuring in some other browser or version. Looking forward to hearing from you.
I have discovered the issue. My application has an image button at the top of the master page whose click event sends the user back to the home page. From http://www.4guysfromrolla.com/articles/060805-1.aspx I read that "When the Enter key is pressed within an ASP.NET Web Form that has multiple single-line textboxes, the form will submit and the Button Web control that appears first in the HTML page's markup will have its Click event fired." I was not aware that pressing the Enter key caused a postback.
Click
Thank you very much for taking the time to make your sample. It really helped me to track this down.