472,954 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Determining the PostBack event caller?

I am wondering if it is at all possible to ascertain what cause the PostBack
event to occur?

Currently I have a DropDownList and 2 Radio buttons that cause a PB (this
may change to 2 Buttons if I am unable to determine the calling control)
whenever their status is changed.

Is it possible to obtain the calling control/method or is this outside the
scope?
Nov 18 '05 #1
3 1909
The "Sender" event argument represents the object that fired the even. You
can use sender.getType.toString to determine what type of control cause the
postback, then you can cast sender into that type and then you could check
its name.
"Wayne" <none@none> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I am wondering if it is at all possible to ascertain what cause the PostBack event to occur?

Currently I have a DropDownList and 2 Radio buttons that cause a PB (this
may change to 2 Buttons if I am unable to determine the calling control)
whenever their status is changed.

Is it possible to obtain the calling control/method or is this outside the
scope?

Nov 18 '05 #2
Where to do you want to find out the object that caused the postback?

--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com

"Wayne" <none@none> wrote in message
news:#$**************@TK2MSFTNGP12.phx.gbl...
I am wondering if it is at all possible to ascertain what cause the PostBack event to occur?

Currently I have a DropDownList and 2 Radio buttons that cause a PB (this
may change to 2 Buttons if I am unable to determine the calling control)
whenever their status is changed.

Is it possible to obtain the calling control/method or is this outside the
scope?

Nov 18 '05 #3
If all else fails, sometimes you can use
request.form("__EVENTTARGET")

"Wayne" <none@none> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I am wondering if it is at all possible to ascertain what cause the PostBack event to occur?

Currently I have a DropDownList and 2 Radio buttons that cause a PB (this
may change to 2 Buttons if I am unable to determine the calling control)
whenever their status is changed.

Is it possible to obtain the calling control/method or is this outside the
scope?

Nov 18 '05 #4

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

Similar topics

2
by: David Abrahams | last post by:
Is there any way to determine the file and line number (if any) of a method's invocation from within its body? Many Thanks in advance, Dave -- David Abrahams Boost Consulting...
66
by: Darren Dale | last post by:
Hello, def test(data): i = ? This is the line I have trouble with if i==1: return data else: return data a,b,c,d = test()
3
by: James Dunkerley | last post by:
Hi, I am trying to create a class which downloads a web page in the background and then raises an event in the original thread in which it was created. This class is going to be the basis of a...
5
by: Matthew Louden | last post by:
I created simple ASP.NET web application to test how AutoPostBack property in a web control works. I set AutoPostBack property to be true of a web control. When I run the application, here's the...
4
by: RTM | last post by:
Can anyone help me with the following issue? I've seen some similar questions here, but none relating to a textbox control.... I have a form with several controls, one of them being a textbox...
3
by: darrel | last post by:
I have a page that checks to see if it's a postback on page_load. I want it to do one of two different things depending on which object triggered the postback. Is there a way to check to see which...
7
by: Michael D. Ober | last post by:
Is there anyway to raise an event from a class and require that any program using that class (not just inheritance) have an event handler for specific events in the class? In my case, some events...
11
by: antonyliu2002 | last post by:
I know that this has been asked and answered thousands of times. As a matter of fact, I know that I need to say If Not Page.IsPostBack Then 'Do something End If for things that needs to be...
2
by: John Kotuby | last post by:
Hi guys, I am converting a rather complicated database driven Web application from classic ASP to ASP.NET 2.0 using VB 2005 as the programming language. The original ASP application works quite...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
1
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.