Akhilesh wrote:
Hi Gaurav,

        By enter I am referring to the key on the keyboard, not a button
on the HTML page. When you press the enter key while the focus is on the
textbox, the page is re-loaded but no re-calculation is done.

Actually I've encountered this annoying behavior in ASP.NET in general, not just on Mono. It also appears to be browser-dependent. It appears that on a form with a single submit button, pressing 'enter' in a textbox will submit the form on all browsers. But there are discrepencies between browsers on whether the button's name and value get passed as part of the submission (as if the button had been pressed) or not (as if the submission happened without any button being pressed).


ASP.NET's button.Click events, then, don't pick up the submission if it happens in one of the latter kind of browsers.

I can't remember which browsers exhibit which behaviors, but I tend to feel that the latter kind are in the wrong. That doesn't change the need to accommodate them in practice, of course. And doing so in the general case is really hard - I believe we eventually managed it with a javascript hack that caught the "enter" keypress and called button.click().

If Mono's ASP.NET were to recognize this scenario and generate code to handle it automatically, that would be a (minor, but) cool benefit to offer over MS's implementation.

Stuart.


-- Stuart Ballard, Senior Web Developer FASTNET - Web Solutions (215) 283-2300, ext. 126 www.fast.net

_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to