473,804 Members | 3,021 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HOWTO determine in content page page_load if masterpage fired post

I want to bypass my content page's page_load event when the postback is
caused by a control from my masterpage, doing something like this from my
content page's page_load handler:

Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArg s)
Handles page.Load

If NOT sender.ThisEven tWasFiredFromTh eMasterPage then
'process normally
end if
(else exit sub, essentially)
end sub

What is the syntax to determine what fired the postback?
TIA,
Berry
Apr 17 '07 #1
0 1533

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

Similar topics

4
4630
by: cheung | last post by:
Hello, Simple question. How can I determine which control fired event in the Page_Init or Page_Load event handler? I saw some post in the past with the similar question. One of the recommendations was to use the sender argument. The questions is how? In my case it contains the form itself and I cannot find how I can retrieve the command name or any other information I need from it?
6
1683
by: Jeff User | last post by:
Hi I have a WebControls.DropDownList. autoPostBack is set to true. I have code (C#) in the event procedure in the code behind and it works fine. OK, now my problem is this: While in the Page_Load event, I want to be able to determine, what event, if any, caused the page to be loading. ie. maybe there are several possible user control events that could have occured. Which one brought me here? So
4
3614
by: Alan Silver | last post by:
Hello, I would like to add a search text box to the master page, so that it appears on every page of the site. I then want the button next to the search box to do a cross page post to the search page, where I want to pick up the contents of the search box. Trouble is, I can't see how to get at the text box on the master page. My code follows:-
4
3017
by: Mori | last post by:
I am using masterPage and I need to populate a textbox that is in a content control with data from popup page that is not part of the master page. This code works if no masterpage is involved. here is the javascript produced: <script>window.opener.document.forms.txtEndDate.value = '7/15/2006';self.close()</script> I basically need to populate txtEndDate on the content page. if
0
2118
by: Managed Code | last post by:
Hello All, Here is my issue and thanks in advance for any assistance. I have a base page with a dropdownlist that fires an event with the selected index. The content page catches the event and sets a connection string to the database. The content page has a simple gridview that should show records from the selected database. Initial content page displays data from correct place. first change of dropdownlist correctly updates content...
1
2966
by: rockdale | last post by:
Hi, I have a masterpage and on the page_load event I Populate my mainmenu from database. I the page_load event of my content, I am trying to programmly select the menuitem that represent current content page, but as you know, the page_load event is fired backward, the content page_load fires first then followed by the master page page_load, I could not get the mainmenu in the content page( have not been initialized since
0
243
by: =?Utf-8?B?Yl9hc3AubmV0?= | last post by:
I want to bypass my content page's page_load event when the postback is caused by a control from my masterpage, doing something like this from my content page's page_load handler: Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles page.Load If NOT sender.ThisEventWasFiredFromTheMasterPage then 'process normally end if
3
6542
by: Roger Frei | last post by:
hello everybody I have a masterpage and several aspx pages that inerhit controls from the masterpage. In the Page_Load event of the content aspx page I want to add some controls. Example code: protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Table table = new Table(); Page.Controls.Add(table);
0
1925
by: e_spork | last post by:
I am using Page.ClientScript.RegisterStartupScript to throw up a Javascript alert box. When I click OK on the alert box, all the controls on my page disappear and I don't understand why. I can View Source in the browser and see all the controls so I know they are there, yet they vanish once I click OK. This is happening on a Content page. The browser is IE 6.0.2900 and I'm running it inside of Visual Studio 2005. My master page...
0
9584
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
10337
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
10082
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
9160
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
7622
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
6854
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
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3822
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2995
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.