Hello everybody,

I have an asp.net version 2.0 website running in a college environment that until recently behaved just fine. A couple of days ago, a user contacted me and told me that when she hit the enter key in lieu of clicking a submit button, the site went away and she was taken to the university home page. I tested the same area she had the problem with, an on-line quiz feature that is coded using xml and c#, and the same thing happened to me. I tried a login screen and hit enter instead of the login button and got taken straight to the university home page. As I said earlier, these things used to work exactly as expected.

I thought it might be something to do with the IIS server, so I ran the site out of my development environment. Same results. Regardless of where you are in the site, if you hit the enter key, you go to the university home page. Button click events for the default buttons do not fire.

Somehow, the enter key has gotten associated with a link to the university home page, and I haven't a clue where to look for the problem. Has anyone ever encountered anything similar?

Thanks, Lew Meyers

Problem update...problem solved. A month or so ago, I replaced an image on the site.master page with an image button. In the button_clicked event, I fired a Response.Redirect to the University home page. Everything seemed to work fine at the time, but somehow, visual studio/.net interpreted that to mean that anytime an enter key was pressed, to fire that event. Go figure! Glad I got it figured out on a Friday, so it didn't bug me all weekend.

Lew Meyers

This article has been dead for over six months. Start a new discussion instead.