473,471 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Asp.Net & Event-handles

Hi, i need to catch two events in then same post (a
TextBox_TextChanged and a Button_Click), but sometimes
dot.net catch these events in one post correctly and
sometimes catch only one event (TextBox_TextChanged) and
not the event Button_Click.
Can you help me please?
Thank's.
Jul 19 '05 #1
1 3661
Since only one of these events could happen at a time (you can't change some
text at the same instant you are clicking a button), they will each cause
the page to be regenerated at the server. Once the page has been
re-generated, your event handler (for the event that caused the new page)
will fire.

You could write a generic sub and add a handler for each of the controls to
it and not write any code for the native event handlers:

Sub Do2ThingsAtOnce (byVal Sender As System.Object) Handles
TextBox.TextChanged, Button.Click

Code for textbox
Code for button

End Sub

By including the Sender parameter in the sub declaration, you could then
trap for which object raised the event (if you wanted that capability).

"Francesco" <fr***************@gruppodatel.it> wrote in message
news:04****************************@phx.gbl...
Hi, i need to catch two events in then same post (a
TextBox_TextChanged and a Button_Click), but sometimes
dot.net catch these events in one post correctly and
sometimes catch only one event (TextBox_TextChanged) and
not the event Button_Click.
Can you help me please?
Thank's.

Jul 19 '05 #2

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

Similar topics

3
by: | last post by:
How can I get the mouse coordinates in Mozilla? I try x = event.pageX but it does not work... basically I try alert(event) and it does not work. Where is the problem? the full code...
7
by: Pete | last post by:
I'm working (playing) on a mouse following script. Yes, the sort no one likes but I'm having great fun tinkering with it - sad. Anyway, if there's enough page content to cause scrolling and I...
3
by: Trevor | last post by:
Hello, How can I setup an event in C#? I would like for class A to have an event, and class B to intercept the event. Class B should not be able to call the event itself, only class A. How is...
1
by: sianan | last post by:
I tried to use the following example, to add a checkbox column to a DataGrid in an ASP.NET application: http://www.codeproject.com/aspnet/datagridcheckbox.asp For some reason, I simply CAN'T get...
3
by: Nathan Sokalski | last post by:
I have a VB.NET function that I am using in an ASP.NET page. The code creates a String, which contains && (the JavaScript Logical AND operator) and is used as part of the JavaScript sent to the...
8
by: Nathan Sokalski | last post by:
I add a JavaScript event handler to some of my Webcontrols using the Attributes.Add() method as follows: Dim jscode as String = "return (event.keyCode>=65&&event.keyCode<=90);"...
3
by: hufaunder | last post by:
I have an interface ITest that includes an event TestStatusChange. There is also a class Test that implements ITest. In one of the functions of Test I want to call the event (see code at the end)...
1
by: adeebraza | last post by:
Hi, Every Body Following is code for Showing Actual Date & Time on the form and also record Date & Time of an event. See the following and use Call Modified when you want to record an event in...
1
by: innermostsecret | last post by:
i am using dreamweaver 8 to build my site. i want to put a code in that stops people from viewing my page source and right clicking on the page. i did a google to find a code for this and used it. ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
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...
1
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...
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.