473,769 Members | 5,834 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TextBox AutoPostBack event not firing correctly

Hi

I've got a TextBox on my WebForm with it's AutoPostback
set to true, and an event handler created for the
TextChanged event.

I would expect this event to be fired when the user types
any character into the textbox. However, the event is
only firing when the users enters text and THEN moves to
another control on the page.

Is this behaviour by design?

Thanks

Ben Fidge
Nov 18 '05 #1
2 2905
AFAIK yes,

It would be far too costly anyway to make a server round trip each time the
user press a key ie the TextChanged event fire when you are reasonably sure
that a sequence of changes is over (ie moving to another control).

Patrice

--

"Ben Fidge" <an*******@disc ussions.microso ft.com> a écrit dans le message de
news:72******** *************** *****@phx.gbl.. .
Hi

I've got a TextBox on my WebForm with it's AutoPostback
set to true, and an event handler created for the
TextChanged event.

I would expect this event to be fired when the user types
any character into the textbox. However, the event is
only firing when the users enters text and THEN moves to
another control on the page.

Is this behaviour by design?

Thanks

Ben Fidge


Nov 18 '05 #2
I totally agree, and took the precaution of switching off
AutoPostBack after the initial event is fired.

Thanks

Ben

-----Original Message-----
AFAIK yes,

It would be far too costly anyway to make a server round trip each time theuser press a key ie the TextChanged event fire when you are reasonably surethat a sequence of changes is over (ie moving to another control).
Patrice

--

"Ben Fidge" <an*******@disc ussions.microso ft.com> a écrit dans le message denews:72******* *************** ******@phx.gbl. ..
Hi

I've got a TextBox on my WebForm with it's AutoPostback
set to true, and an event handler created for the
TextChanged event.

I would expect this event to be fired when the user types any character into the textbox. However, the event is
only firing when the users enters text and THEN moves to another control on the page.

Is this behaviour by design?

Thanks

Ben Fidge


.

Nov 18 '05 #3

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

Similar topics

13
7497
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on it, a frontend and a backend. Case 1: If vba code on the frontend updates many rows (360,000) on the backend, a form's timer event (from the frontend) will stop firing until the user gives the form focus. (Note that the update itself always...
2
5500
by: rdb | last post by:
VB.NET web program with a webform w/2 dropdownlistboxes, set to AutoPostBack TRUE, selection in either dropdown fires the SelectedIndexChanged events correctly UNTIL I navigate to second webform in the same project, THEN use the Back button to return to first webform; then changing the selection of the second dropdownlistbox fires the SelectedIndexChanged event for the FIRST dropdownlistbox. I realize that a) using an eventhandler for...
4
3915
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 the following wireup in my code-behind... this.txtMyTextBox.TextChanged += new System.EventHandler(this.TextChange);
4
7400
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 into. One is for Lbs and one is for kg and I'm using the OnTextChanged event to populate the other control if one is filled in (converting between kg and Lbs). It works, but when one TextBox is changed and it sets the other's value, the second...
11
7764
by: Joe | last post by:
Hello All, I have an ASP.NET page with one Textbox (SearchTextBox) and one ImageButton (SearchButton) server controls. The user can type search text in SearchTextBox and click SearchButton and the web server performs a database query and displays the results. All of this works fine. I want the user to be able to press the Enter key while the cursor is still in SearchTextBox and have the SearchButton.Click event fire (thus performing...
6
1732
by: John Smith | last post by:
I have my <asp:TextBox> inside one of DataGrid's columns. I haven't set AutoPostBack=True. When I hit the ENTER button, my page "refreshes" (I belive that PostBack was performed - however not sure). I don't want anything to happen when ENTER is being pressed. The other option is that button event might execute (button next to my asp:TextBox). How can I do this?
9
3249
by: zdrakec | last post by:
Hello all: Clearly, I'm not getting it! Here is the scenario: On a web page, I have two list boxen and a text box. The first listbox is populated at page load time (if it is not a postback). This listbox has AutoPostback = True. When the user selects an item from this list, the second listbox is populated with more items relevant to this selection. I am using an SQLDataSource web control for this. These items are headers. I want, when...
0
1104
by: Syed81 | last post by:
Hi All, I have used one textbox inside datagrid's itemtemplate.During its textchanged event i have did some calculations in code behind using add handler.I have set autopostback=true.But its textchanged event is not firing when i move to the next cell.But for another textbox in the same row it is firing. Anybody plz give me the solution Regards Syed
4
5958
by: =?Utf-8?B?UmVuYXVkIExhbmdpcw==?= | last post by:
Hello, I have a strange yet very simple problem with the asp.net Textbox web control. On an empty asp.net page, add a single asp:TextBox control with Autopostback=false with nothing else on the page. according to the doc, hitting Enter while the TextBox has focus should do nothing since Autopostback=false. The problem i have is that it posts the form (that is, it ignores the Autopostback=false).
0
9579
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9416
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10199
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9849
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8861
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7393
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5433
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3948
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.