473,387 Members | 3,684 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,387 software developers and data experts.

How to make all pages have the same layout

How do I make many pages with the same layout?
I have created header, side bar, main body, and footer web controls and
added them to a table. I have many pages that want to use this same layout,
BUT I DON"T to have to duplicate the layout in each page.
Is it possible to use the layout from one base class or template?
Inheritence only inherits the methods and properties, but not the layout and
addition of the web controls.
--
Thanks Brian
Nov 18 '05 #1
6 2233
All pages can have the same Layout and the Data/content can change!
I don;t know what your pages would look like!
U can make use of USERCONTROLS!
"briand" wrote:
How do I make many pages with the same layout?
I have created header, side bar, main body, and footer web controls and
added them to a table. I have many pages that want to use this same layout,
BUT I DON"T to have to duplicate the layout in each page.
Is it possible to use the layout from one base class or template?
Inheritence only inherits the methods and properties, but not the layout and
addition of the web controls.
--
Thanks Brian

Nov 18 '05 #2
I am using USERCONTROLS but I have to add the user controls to every page.

Eg
Say Product1 page has a header , footer, sidebar and main section for info
about Product1. These are all added to a table.
Also Product2 has a header , footer, sidebar and main section for info about
Product2. These are all added to a table.

Now if I want to change that layout I have to change both pages.

I was hoping it would be possible to create one page template.aspx and then
derive all ofther pages from that that. So chaning the layout only involves
changing the one page template.aspx.

I guess I can one user control with a header , footer, sidebar and main
section for info about Products. These are all added to a table. Then add
this control to every page.

I new to ASP.NET development but have a Apllication development background
where deriving from one control includes all the UI components and not just
the properties and methods as in ASP.NET.


Nov 18 '05 #3
ASP.NET 2.0 Master Pages are the great solution.
Unfortunately it's still in beta for now, so if you need something now for
production I'd suggest user controls.

Here are a couple of alternatives:
http://authors.aspalliance.com/PaulW...rticles/?id=14
http://www.sellsbrothers.com/writing...mtemplates.htm

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"briand" <br****@discussions.microsoft.com> wrote in message
news:61**********************************@microsof t.com...
How do I make many pages with the same layout?
I have created header, side bar, main body, and footer web controls and
added them to a table. I have many pages that want to use this same
layout,
BUT I DON"T to have to duplicate the layout in each page.
Is it possible to use the layout from one base class or template?
Inheritence only inherits the methods and properties, but not the layout
and
addition of the web controls.
--
Thanks Brian

Nov 18 '05 #4
Thanks, I look forward to the release of MasterPages

Nov 18 '05 #5
You can try out Page template option. Check out this article for more
details,
http://www.microsoft.com/india/msdn/articles/93.aspx
--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"briand" <br****@discussions.microsoft.com> wrote in message
news:61**********************************@microsof t.com...
How do I make many pages with the same layout?
I have created header, side bar, main body, and footer web controls and
added them to a table. I have many pages that want to use this same layout, BUT I DON"T to have to duplicate the layout in each page.
Is it possible to use the layout from one base class or template?
Inheritence only inherits the methods and properties, but not the layout and addition of the web controls.
--
Thanks Brian

Nov 18 '05 #6
http://www.devx.com/dotnet/article/18011

This article shows you how to create very flexible and re-usable page
templates. This article is fantastic as it lists the possible methods to
achieve page templating in ASP.NET 1.1, explains the best way, then has lots
of code to demonstrate how to do it.

"briand" <br****@discussions.microsoft.com> wrote in message
news:61**********************************@microsof t.com...
How do I make many pages with the same layout?
I have created header, side bar, main body, and footer web controls and
added them to a table. I have many pages that want to use this same layout, BUT I DON"T to have to duplicate the layout in each page.
Is it possible to use the layout from one base class or template?
Inheritence only inherits the methods and properties, but not the layout and addition of the web controls.
--
Thanks Brian

Nov 18 '05 #7

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

Similar topics

82
by: Peter Diedrich | last post by:
The site design is pretty simple: ============================================ | Head | ============================================ | | ...
14
by: keith edward | last post by:
Hello, I have a long web document... about 30 pages. It is currently in HTML (tables)... how do I format it so that is will print the pages correctly? Thanks, Keith
15
by: DesignGuy | last post by:
I've inherited a site that has 1000+ product pages that follow a similar layout. I would like to import these pages into a database for ease of future updating. The pages have the usual banners,...
3
by: Rennie deGraaf | last post by:
I'm working on this page (http://pages.cpsc.ucalgary.ca/~degraaf/test/test.html). In the central (green-bordered) area, I want a bunch of (red-bordered) blocks each containing a thumbnail image...
7
by: Dean Trower | last post by:
Does anyone know a clean method of preventing scrolling altogether in a TEXTAREA (i.e. ensuring the user CANNOT type more text than fits inside the box area)? I'd like to know how, if so... It...
67
by: Sandy.Pittendrigh | last post by:
Here's a question I don't know the answer to: I have a friend who makes very expensive, hand-made bamboo flyrods. He's widely recognized (in the fishing industry) as one of the 3-5 'best' rod...
2
by: Craig Kenisston | last post by:
Hi, I am starting to learn ASP.net, and I am studying the starter kits. I've trying to determine which is the optimal way to have a classical page with a top header, a left hand menu and a right...
1
by: Sasha | last post by:
Hi all asp.net proffesionals out there, How do you implement master pages in your applications? What libraries do you use and what have been your experience? Sasha
1
by: Jeff | last post by:
I'm having a terrible time understanding how the Master Pages in VWeb 2005 using VB - handle layout issues with content placeholders and tables. Everytime I think that I understand how these things...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...

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.