473,421 Members | 1,427 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,421 software developers and data experts.

Web TextBox TextChanged Event

Working on a web project (academic example) for a beginning VB class where
there are four text boxes, each to hold four characters. I want focus to
shift automatically to the next text box when the user has entered the 4th
character in a given text box.

I'm trying to use the TextChanged event to make this happen, but it appears
as if the TextChanged event never fires? I thought it would fire each time
the user entered a new character so that a test could be made like...

If TextBox1.Text.Length 3 Then
TextBox2.Focus()
End If

It muse be something basic I don't understand about events and web pages?
Nov 13 '06 #1
2 2312
Did you enable autopostback for the textbox? Otherwise the server-side code
won't be called unless some other postback event occurs. This could be the
wrong approach however. It may be easier to set the taborder on the
textboxes for this, in addition to using a javascript to help move it along.

--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"pvdg42" <pv****@newsgroups.nospamwrote in message
news:Oy*************@TK2MSFTNGP03.phx.gbl...
Working on a web project (academic example) for a beginning VB class where
there are four text boxes, each to hold four characters. I want focus to
shift automatically to the next text box when the user has entered the 4th
character in a given text box.

I'm trying to use the TextChanged event to make this happen, but it
appears as if the TextChanged event never fires? I thought it would fire
each time the user entered a new character so that a test could be made
like...

If TextBox1.Text.Length 3 Then
TextBox2.Focus()
End If

It muse be something basic I don't understand about events and web pages?


Nov 13 '06 #2

"Mark Fitzpatrick" <ma******@fitzme.comwrote in message
news:ON**************@TK2MSFTNGP04.phx.gbl...
Did you enable autopostback for the textbox? Otherwise the server-side
code won't be called unless some other postback event occurs. This could
be the wrong approach however. It may be easier to set the taborder on the
textboxes for this, in addition to using a javascript to help move it
along.

--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
Thanks, Mark.
I had tried enabling AutoPostback without beneficial results, so I guess
it's the JavaScript route...
Nov 14 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: David Smith | last post by:
What I want to be able to do: A textbox is available that the user can enter information into. Specifically (for the purposes of this post), the user is asked to enter a number, and that number...
5
by: Vi | last post by:
Hello, I want to be able to reload a DropDownList when a TextBox changes its value. So I set the AutopostBack property of the TextBox to true and in the code behind I do something like: ...
4
by: Craig G | last post by:
i have the following code for validating a textbox once a page posts, but the problem i am having is that the TextChanged event won't fire next time if the user does not change the value again ...
4
by: MattB | last post by:
Hi. I'm working on an intranet application that requires a user to input information about themselves. I have a user control with a couple of textboxes that I want the user to enter their weight...
3
by: ton | last post by:
How can I detect that the user has modified the data on the page where several textboxes, checkboxes and dropdownlist exist. Ton
7
by: Itar | last post by:
I'm having a problem supressing characters in a text box. I only want alpha numeric characters (no special chars). I can handle the TextBox_KeyPress event to supress the invalid characters when...
10
by: Dennis | last post by:
I have a simple form with one button and one text box. In the Form, I create an array list to track the events by adding a descriptive string item to the arraylist in each event. I first Click on...
3
by: DotNetNewbie | last post by:
I am reading the book Teach Yourself Microsoft Visual Basic .Net 2003 in 21 Days. I am having trouble getting one of the exercises to work at the end of day 4. Exercises: 1. Create a new...
4
by: Jason Huang | last post by:
Hi, In my C# Windows form MyForm I have some TextBoxes. In these TextBoxes, we have to detect if the TextChanged event occurs, if there're changes in these TextBoxes, it will ask if we want to...
5
by: S_K | last post by:
This is a weird problem.. I have a page with a textbox and a button (along with a bunch of other stuff). Both the textbox and the button have their SEPERATE events defined for the textchanged...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.