473,403 Members | 2,359 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,403 software developers and data experts.

page template for a beginner

i have managed to get page templates working by creating a template.cs file
with the following code. i hope this is the best way?!?!
public class BasePage : Page
{
protected override void OnPreRender(System.EventArgs e)
{
this.Controls.AddAt(1,LoadControl("Header.ascx"));

this.Controls.AddAt(this.Controls.Count-1,LoadControl("Footer.ascx"));
base.OnPreRender(e);
}
}

But this renders the page from top to bottom. How would I insert a menu down
the left hand side of my aspx page using the above technique.

Ideally, I would like to inherit from a user contol, so I can use the html
editor to create the basic table layout, and put placeholders in each key
table cell (ie: header cell, left menu cell, main body cell, footer cell).

If this is possible, what would my code in my aspx pages have to look like
so that it inherits the header, left menu and footer cells from a template,
and the main body cell contains whatever I place in my aspx pages? i would
need to be able to change page titles, css paths on the fly too.

thanks a lot!


Nov 17 '05 #1
0 957

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

Similar topics

4
by: Sebastian Faust | last post by:
Hi, I have 4 questions related to templates. I wanna do something like the following: template<typename T> class Template { public: Template_Test<T>()
1
by: Joachim Spoerhase | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I am a XSLT-beginner and i read the XSLT-recommendation of the W3C through. But I did'nt really understand section 5.5 of the latest...
7
by: Rolf Kemper | last post by:
Dear All, somehow I remember that such or similar question was discussed already somewhere. But I can't find it anymore. I have a template calling itself. As long it goes deeper into the...
1
by: BekTek | last post by:
I'm still confused about the template partial specialization which is used in many libraries.. due to lack of introduction for beginner.. Could you tell me about that in short? Thanks in...
7
by: zhi.wong | last post by:
The following code is a simplification of a example in "The C++ programming language". So, it is assumed to be STANDARD c++. But Visual C++ 2003 complains about the function defination of get_free....
1
by: suzy | last post by:
hi, i have created a aspx page template by creating a template.cs file which inherits from the page class. In this file I override the OnInit event and create a template in the form of a...
3
by: serge calderara | last post by:
Dear all, Is there any particular rules on the type of code we usually place inside the Page load event and checking the IsPostback status ? As a beginner I could imagine to put quite many...
1
by: Ranginald | last post by:
Hi, My goal is to have a class named class1 that will render a label control on whatever page needs it. I want to instantiate class1 from whatever page, and then call the createLabel() method...
3
by: JanW | last post by:
Somewhat a C++ beginner, I'm trying to make a general test function that could test unary operators (or methods) of an object of any class. Arguments are a member-pointer to the function, a...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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
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...
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.