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

textchanged event not firing

I have two fields on my webform that I want calculated in
my code-behind, but as I type in the controls, the events
are not firing (as evidenced in debug mode).

<code>
Private Sub txtMileageBeginning_TextChanged(ByVal sender
As Object, ByVal e As System.EventArgs) Handles
txtMileageBeginning.TextChanged
If (txtMileageBeginning.Text.Trim <>
String.Empty) AndAlso (txtEnding.Text.TrimEnd <>
String.Empty) Then
txtTotal.Text = txtMileageBeginning.Text.Trim
+ txtEnding.Text.TrimEnd
End If
End Sub

Private Sub txtEnding_TextChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
txtEnding.TextChanged
If (txtMileageBeginning.Text.Trim <>
String.Empty) AndAlso (txtEnding.Text.TrimEnd <>
String.Empty) Then
txtTotal.Text = txtMileageBeginning.Text.Trim
+ txtEnding.Text.TrimEnd
End If
End Sub
</code>

How can I get these events to fire in order to
dynamically calculate the total?
Nov 18 '05 #1
1 3164
Hi,

1) Did you set autopostback to true?
2) It sounds that you expect event to occur while you typing in text
box. This event occurred when the user will leave changed textbox.
Imagine that for every character that you will enter to textbox request
to the server will be made.

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)52-8888377
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2

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

Similar topics

3
by: Fabrício de Novaes Kucinskis | last post by:
Hi all, I have a combobox control, in wich I put an autocomplete code. This code is in the TextChanged event, but when this event fires, the Text property isn't updated yet. For example, if...
4
by: Francesco | last post by:
Hi all, I am trying to make a UserControl with a TextBox in it. I have to publish the TextChanged event of the inner TextBox, but I have some trouble. If I declare : public event EventHandler...
2
by: jorge | last post by:
Hello I have the following situation: (everything is dynamic (controls.add)) 1. Button.Init { WasButtonClickFired = true } 2. TextBox.TextChanged { WasButtonClickFired?
1
by: Samuel Chan | last post by:
I used the textchanged event of textbox and set the autopostback property to true. The textchanged event should fire when the content of the textbox is changed and user tab out of the textbox...
2
by: gaurav | last post by:
hi, I have a problem, How do i use TextChanged Event by clicking on Button. When i changed the text in text box and moving the focus from there then it is working but i have one calender popup...
4
by: dhnriverside | last post by:
Hi guys I'm trying to get ASP.NET to do something when someone starts typing in my textbox, but it doesn't want to fire the codebehind! I've got AutoPostBack set to to True on my textbox, and...
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...
1
by: PromisedOyster | last post by:
1. I have a series of RequiredFieldValidators that need to be be enabled/disabled depending on what the user types into various text boxes. Can I do this using the Enabled property of the...
1
by: jeeber | last post by:
I saw this on another thread (Francesco November 15th, 2005 UserControl.TextChanged) but I didn't see how to add to the discussion, so I'm just starting a new one and hope that people find it. 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
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...
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,...

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.