473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

ascx questions

Hi

I have an ascx (MainCalendarControl.ascx), which includes another ascx, by
using this statement at the top of MainCalendarControl.ascx:

Register TagPrefix="CalendarUI" TagName="ActivityListControl"
Src="ActivityCalendar.ActivityListControl.ascx"

Then there are various tables etc in MainCalendarControl.ascx to display
some data, and last:

<
CALENDARUI:ACTIVITYLISTCONTROL id="activityList"
runat="server"></CALENDARUI:ACTIVITYLISTCONTROL


What order should the page display be generated? It appears the Page_Load
method in the included ActivityListControl.ascx is called before the
Page_Load in the containing MainCalendarControl.ascx - is this correct?

And it also appears that the Page_Load method in ActivityListControl.ascx is
called twice - why would this be?
That is, the order of calls to Page_Load is:

ActivityListControl.ascx Page_Load
MainCalendarControl.ascx Page_Load
ActivityListControl.ascx Page_Load
Thanks for any comments,
Peter
Mar 29 '06 #1
2 1204
Hi Peter,

It's correct that first the child must be loaded (Page_Load) before the
parent can be loaded.

I would not expect the Page_Load to fire twice for the same control, but
from what I have read, i cannot give you a solution.

--
Ward Bekker
"Asp.Net Discussions for the Professional Developer"
http://www.dotnettaxi.com

"Free .Net 2.0 C# to/from VB.Net Code Converter"
http://www.dotnettaxi.com/Tools/Converter.aspx
Mar 29 '06 #2

"Ward Bekker" <wa**@NospaaMequanimity.nl> skrev i en meddelelse
news:e0**********@news.cistron.nl...
Hi Peter,

It's correct that first the child must be loaded (Page_Load) before the
parent can be loaded.

I would not expect the Page_Load to fire twice for the same control, but
from what I have read, i cannot give you a solution.


Hi, thanks for your answer. I found out that the reason the Page_Load was
being fired twice was because the two ascx's are running in a CMS, which
controls what is showed where - and the CMS was generating a view which
included both the main and child ascx's, at the same time as the main ascx
was including the child ascx.

Peter
Mar 29 '06 #3

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

Similar topics

2
by: nets | last post by:
I have a struct... namespace Test.Web.UserControls { public struct StructTest { public const int PageBorder = 0; .... And I'm trying to use it in a ".ascx" file:
4
by: Rob Meade | last post by:
Hi all, I have just put together our organisations 'template' for our web applications and have created 7 .ascx files which when dropped into my template file work perfectly...however, I have a...
2
by: Wade Beasley | last post by:
I have a web project that currently has a standard header, footer, and menu ascx files. I am now suppose to change the project to allow a user to choose from 3 different views, ie 3 different...
1
by: John Cosmas | last post by:
I've got a page which loads up a different user control into a placeholder control every time a button is clicked on the parent page. I use a statement like...
4
by: Frank Schumacher | last post by:
Hi NG, I have 2 problems working with an user control (ascx) and couldn't find a solution yet. I created a simple ascx with some ImageButtons and drag it on a simple Webform, this code was...
1
by: news.bellatlantic.net | last post by:
Two questions: I know that ASP can't see ASP.NET sessions and vice versa. I have an existing ASP intranet site that requires a user to login and session so we can control the permissions of the...
6
by: tshad | last post by:
I have an ascx file I am using to include my logos and heading information for all my pages. It was working fine up until now. I decided to set up an admin folder inside of my main folder and...
3
by: Steven Nagy | last post by:
Hi all, ASP.NET : Framework 2.0 - C# A recent addition to my code generater will create GridView's and ObjectDataSource's in a control (ASCX). So the code gen creates an ascx, ascx.cs,...
2
by: TARUN | last post by:
I have a question about declaring the Global.ascx: In VS.NET I create a Solution, and there are 4 projects under it. They are put under 4 folders, but web pages would be called across the 4...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
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...
0
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...
0
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,...

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.