Post Back in 2.0

R

roger31

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
 
B

Bob Barrows [MVP]

roger31 said:
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
 
R

roger31

Thanks a lot

Bob Barrows said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,143
Messages
2,570,822
Members
47,368
Latest member
michaelsmithh

Latest Threads

Top