By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,589 Members | 1,209 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,589 IT Pros & Developers. It's quick & easy.

Where am i going wrong ASP.NET

P: n/a
Hi,

I created an ASP.NET application in VB.NET. I put one text
box (Textbox1) and a button (button1) to the web form
(webform1). Then I clicked on the button and add the
following code.

Textbox1.text = "Hello World"

When I ran the project and put the cursor in the text box
and type something and then pressed the enter key it did
not show the "Hello World" text. In order to show
the "Hello World" text I had to press the button with the
mouse.

I then dragged another text box and ran the project. This
time I entered to the textbox1 as usual and typed
something and pressed the enter key and "Hello World" was
displayed.

I want to know is this a bug in ASP.NET or am I missing
something.

Please help me. This is really an issue when you have a
search function where there is one box and one button.
Every time the user has to use the tab or the mouse to
chick on the function.

Thanks
Vinodh

Nov 22 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I am not pretty sure about this,

When there are multiple ways of submitting a form ASP.NET auto generates a
javascript function named __doPostBack. Using this we can fire a page
postback.
This will get generated only when there are multiple ways of raising a
postback event like Button_Click, LinkButton_Click. This event won't get
generated if there is nly one possible way of submitting the form. I think
this should be the reason for your problem. This you can view it by using
"VIEW SOURCE" in IE after the page gets generated.

Thanks,
Jagan Mohan
MCP

But when you actually there is only one way of submitting a form ASP.NET
does not generate a __doPostBack javascript function

"Vinodh" <vj**********@comnet.co.nz> wrote in message
news:05****************************@phx.gbl...
Hi,

I created an ASP.NET application in VB.NET. I put one text
box (Textbox1) and a button (button1) to the web form
(webform1). Then I clicked on the button and add the
following code.

Textbox1.text = "Hello World"

When I ran the project and put the cursor in the text box
and type something and then pressed the enter key it did
not show the "Hello World" text. In order to show
the "Hello World" text I had to press the button with the
mouse.

I then dragged another text box and ran the project. This
time I entered to the textbox1 as usual and typed
something and pressed the enter key and "Hello World" was
displayed.

I want to know is this a bug in ASP.NET or am I missing
something.

Please help me. This is really an issue when you have a
search function where there is one box and one button.
Every time the user has to use the tab or the mouse to
chick on the function.

Thanks
Vinodh

Nov 22 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.