roger31 wrote:
Hello - I created a simple website with one page. This simple page
has only one text box (asp:Textbox) and no other controls. When i
bring the siteup in VS2005 and press enter with the cursor inside the
text box the page refreshes. I am not able to understand why it is
posting back? I have set Autopostback to false. Am i missing anything
or is it the default behavior? Thanks
There was no way for you to know it, but this is a classic asp newsgroup.
While you may be lucky enough to find a dotnet-savvy person here who can
answer your question, you can eliminate the luck factor by posting your
question to a newsgroup where the dotnet-savvy people hang out. I suggest
microsoft.public.dotnet.framework.aspnet.
However, this is a browser-related issue. Some browsers automatically submit
when the Enter key is pressed anywhere in the form. If you use the tab key
to move out of the textbox, the form will not submit unless you've set
auto-postback to true.
Here is a link posted by Mike Brind last week:
http://www.cs.tut.fi/~jkorpela/forms/enter.html
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.