473,395 Members | 1,975 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Where am i going wrong ASP.NET

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
1 1355
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

36
by: Jack Hughes | last post by:
This argument has come up two or three times lately. We have a web standards document at our company that say "Use valid HTML 4; We don't recommend switching to DIV-based CSS-P for layout just...
8
by: John Welch | last post by:
I have a command button with the following code: DoCmd.OpenForm "frmSearchAssignments", , , "SearchAssignmentID = 1" (SearchAssignmentID is the PK, auto number) When it runs, the form opens but...
4
by: nospam | last post by:
HtmlSelect has a method called OnServerChange that supposed to detect whether the control (select) has changed on a postback. This is not all that useful. It should be like the asp.net...
3
by: Sukh | last post by:
I have to design a "Online Test Application" and application is going to display question and answers.All the questons are objective type so there is four answer for each question. My Question is...
15
by: E-Dot | last post by:
I am trying to write a program which asks the user to enter a number in the interval , the program then gives the natural logarithm of that number, using the series for log(x+1)... Here is what...
41
by: Miroslaw Makowiecki | last post by:
Where can I download Comeau compiler as a trial version? Thanks in advice.
2
by: jonathan184 | last post by:
Hi basically what i want this script to do is In a particular dir there are alot of files from today back to 1999 or earlier. So I am trying to have the script search this dir and sort the files...
25
by: sidd | last post by:
In the following code: int i = 5; ---it goes to .data segment int j; ---it goes to bss segment int main() { int c; int i = 5; ---stack
68
by: DaveJ | last post by:
Recently I was working on a project where I came across an issue where the program cored and reported "free(): invalid pointer". I found a resolution for this, but don't fully understand why the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.