473,748 Members | 5,230 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 1134
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
1610
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
3285
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
1882
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
2440
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
3125
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
8703
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
1516
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
1074
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
1052
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
8991
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
8830
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
9544
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
9372
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...
1
9324
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8243
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...
0
4606
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...
1
3313
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
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.