ASP.NET TextBox verses input type="text" behavior

Posted by harrije on Stack Overflow See other posts from Stack Overflow or by harrije
Published on 2010-06-15T22:33:14Z Indexed on 2010/06/15 23:12 UTC
Read the original article Hit count: 287

Filed under:
|
|
|

I notice with ASP.NET if the server side control TextBox is used with out autopostback it will not submit (or postback) the form when typed text ends with enter, which is different from the behavior for plain old HTML pages. Fine, I can set autopostback to get the behavior I want after the enter key. However, autopostback will also cause submit (or postback) when the typed text does not end with enter but focus has changed (i.e. with tab or mouse click), which again is different from plain old HTML pages.

How can I get an ASP.NET page to behave the same as a plain old HTML page with respect to text input regardless of whether enter key or change of focus occurs?

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about text