473,699 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Know the object does the postback

Hi,

Is there any way that I can know the object that does
fires or does postback to the page on the Page_Load event.

I tried to use the sender object that is defined as
parameter into this event.

Thanks for any help provied.

Cheers...
Nov 18 '05 #1
2 1129
There's not a great way.
Generally the best solution is to simply move your Page_Load code to the
PreRender event , which happens after
all the control events. So by then the control that caused the postback
should have its event handled and you can set a flag or something to let you
know which one caused it.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
"Erick" <an*******@disc ussions.microso ft.com> wrote in message
news:06******** *************** *****@phx.gbl.. .
Hi,

Is there any way that I can know the object that does
fires or does postback to the page on the Page_Load event.

I tried to use the sender object that is defined as
parameter into this event.

Thanks for any help provied.

Cheers...

Nov 18 '05 #2
Thanks Steve, I really apreciate you answer

Will try with this event..

Regards...
-----Original Message-----
There's not a great way.
Generally the best solution is to simply move your Page_Load code to thePreRender event , which happens after
all the control events. So by then the control that caused the postbackshould have its event handled and you can set a flag or something to let youknow which one caused it.

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able- consulting.com

"Erick" <an*******@disc ussions.microso ft.com> wrote in messagenews:06******* *************** ******@phx.gbl. ..
Hi,

Is there any way that I can know the object that does
fires or does postback to the page on the Page_Load event.
I tried to use the sender object that is defined as
parameter into this event.

Thanks for any help provied.

Cheers...

.

Nov 18 '05 #3

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

Similar topics

3
1609
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 object triggered the postback? -Darrel
4
3281
by: blackhawk | last post by:
I need to build a web page that has to potentially display a large amount of data in two grids on the same page. The HTML file with all of the formatting is about 7MB in size. This is too large and I need to implement some kind of "client side" lazy loading. What I mean is this: I want to display a grid that only shows, say, 20 records. I need an external scrollbar control that I can then show on the screen next to the grid. When...
4
1878
by: Marty U. | last post by:
How can you declare an object that is global to a page even on postbacks? I currently have something like this MyObject m; throughout the page on the initial load everything works fine but on postback anything referencing m I get NullReference. How can I declare an object to have page level scope through postback.
13
2432
by: Max | last post by:
Hi There! I'm having a mysterious error right after I login using Forms Authentication in my ASP.NET app. Below is the error... Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. The exception throws at the code that tries to set a property (String data type) at my Menu user control.
12
3119
by: Rudy | last post by:
Hi, I need to make a request to a asp.net page using HttpWebRequest class and I need to trick this page into thinking it's a postback and a button was clicked. But the page doesn't handle the click event, despite I'm using "POST" method and sending all the form fields (except of __VIEWSTATE, may this be the reason ?). So the question is: on what basis does asp.net page set the ispostback property to true or false?
12
8691
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press update after making changes, but I don't want that update button. How can I get the updated object when the user presses one of my other action buttons?
6
1513
by: David Whitchurch-Bennett | last post by:
Hi There, I have created a very simple web user control, containing only a combo box. I have created a class which contains some private object variables, for example... Private _anObject as Object Public Property anObject() As Object Get
7
1073
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, does server-side page_load what button was pressed on a postback? thanks, rodchar
3
1049
by: lander | last post by:
How does asp.net know to set the Page.IsPostBack property exactly??? Would somebody detail this, thanks very much...
0
8689
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
9178
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
9035
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8885
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...
1
6534
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
5875
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3058
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
2
2348
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.