473,782 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Page Load and webcontrol page load

Hi,

I have a question, i have a web control in my web page. Let say i have
page pag1.aspx and control.ascx and page1 contains control.
I have written code on the page load of page and also the control but
page1 page load is never called. Is there any reason or any setting i
need to do to ?
venky

Nov 19 '05 #1
5 1797
Venky:
something seems odd. No reason why you shouldn't see code from both events
(the Page_Load one first). Coud you provide some sample code of the
problem?

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"venky" <ve************ @yahoo.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
Hi,

I have a question, i have a web control in my web page. Let say i have
page pag1.aspx and control.ascx and page1 contains control.
I have written code on the page load of page and also the control but
page1 page load is never called. Is there any reason or any setting i
need to do to ?
venky

Nov 19 '05 #2
Is your event hook lost?
Event hook in your InitializeCompo nent() method commonly.Check that
method,It should look like:
private void InitializeCompo nent(){
this.Load += new System.EventHan dler(this.Page_ Load);// lost?
}
--
Help you,Help me.
"venky" wrote:
Hi,

I have a question, i have a web control in my web page. Let say i have
page pag1.aspx and control.ascx and page1 contains control.
I have written code on the page load of page and also the control but
page1 page load is never called. Is there any reason or any setting i
need to do to ?
venky

Nov 19 '05 #3
Hi Venky, following on from Marshals post, in VB the the signature for the
page load handler would be
Sub Page_Load(o as object , e as eventargs) handles mybase.load

HTH jd

"marshal" wrote:
Is your event hook lost?
Event hook in your InitializeCompo nent() method commonly.Check that
method,It should look like:
private void InitializeCompo nent(){
this.Load += new System.EventHan dler(this.Page_ Load);// lost?
}
--
Help you,Help me.
"venky" wrote:
Hi,

I have a question, i have a web control in my web page. Let say i have
page pag1.aspx and control.ascx and page1 contains control.
I have written code on the page load of page and also the control but
page1 page load is never called. Is there any reason or any setting i
need to do to ?
venky

Nov 19 '05 #4

NOpe, it didn't get lost. The event mapping is there but still page load
function is not called but the webcontrol page load is called.

venky
*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #5
i am seeing the code for events, but event from the aspx page load is
not called, i mean if i put a break poing in the page, page load and
also on web control page load, only web control page load is called but
the page's page load is not called

Nov 19 '05 #6

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

Similar topics

8
3367
by: Brian F | last post by:
Exactly what the subject says. I have an ASP page that I want my C# windows application to open in Internet Explorer, and if possible have it send along a list of values from a list box. Thank you.
6
11301
by: martin | last post by:
Hi, I am a web page and a web user control. My web user control is placed in my web page using the following directive <%@ Register TagPrefix="uc1" TagName="Header" Src="WebControls/Header.ascx" %> The web user control contains the following server controls
3
1456
by: spmm# | last post by:
Hi! Could someone please help me with the following; I have a WebControl that basically looks like this: public class LeftMenu : System.Web.UI.WebControls.WebControl { private string m_CurrentNodeId = string.Empty; public string CurrentNodeId
4
1204
by: Support | last post by:
Hello: I have a aspx web page - let's call it main.aspx It contains a placeholder: Myplaceholder. I have a web control, lets call it webcontrol which has a code behind class called webcontrolclass and a label called mycontrollabel In the webcontrolclass, I have a private sub called: Sub writetomycontrollabel(stuff as text) mycontrollabel.text=stuff
3
2679
by: Tome73 | last post by:
Could someone give me a comprehensive order of events as they pertain to web controls within a page. The page events are: Page_Init Page_Load Page_PreRender Page_Unload Page_Disposed So where would the Init and Load events of web controls fit into the page events. Would it be?
4
2160
by: jesper_lofgren | last post by:
Hi there, I have some webcontrols that i want to add dynamically on a page. I have stored the path / namespace in database (ex MyNameSpace.WebControls.Control1) to the class/webcontrol. Lets say i have a column in database that looks like this. PageID (int) Webcontrol (varchar) 1 MyNameSpace.WebControls.Control1
6
29654
by: Dariusz Tomon | last post by:
Hi How can I get url of page so taht I can pass it to string varaible. I have got several urls in my IIS under one folder. I want to have one default.aspx where code under it recognize which url is used by user and then display appropriate data to that url (one url is about fashion, other about law and so on). By means of recognition of url I can display appropriate banners for example.
5
1601
by: studio60podcast | last post by:
I have been fighting with this for almost two days and I can't figure it out. I'm hoping someone can shed some light on my problem. I have a web user control (NewAccountHolders) that contains a generic list of another web user control (NewAccountHolder). I place NewAccountHolders in a page and all renders properly, but the _lnkRemove_Click never fires when I click "Remove". If I create instances of NewAccountHolder outside of...
5
2715
by: =?Utf-8?B?bXVzb3NkZXY=?= | last post by:
Hi guys I'm trying to make my code as streamlined as possible, and add CSS file references dynamically when they are required, for example, if a page contains a webcontrol, then the related CSS file is added by the webcontrol. This prevents me having to remember to add the CSS file to the page if I use a certain webcontrol. I have a MasterPage with an array of StyleSheets, and a public function for
0
9641
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
10313
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...
1
10080
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
8968
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
7494
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
6735
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
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
3643
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.