473,508 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do you handle template creation in ASP.NET?

I have been researching a couple of different ways to accomplish a
master "Template" page, usually being default.aspx or index.aspx that
holds the repeating content of the site.

Most of the postings i've come across say they have a main page, and
all the subpages they create as a UserControl. i.e.: index.ascx,
contact.ascx and then by using a unique query string, they call the
usercontrols into the main page. i.e.:
http://www.mysite.com/index.aspx?page=contact

I am wondering what other options might be available that we can use
as it seems kind of strange to have to use UserControls for page
content. is there any other suggestions that people have employed that
work well?

I would greatly appreciate any comments anyone might have on this.
Nov 18 '05 #1
1 1069
You could also have a base page class. This base page outputs the content
common to all pages (site navigation, etc. Your other pages all inherit
from this class instead of from Page, and have additional content specific
to each page.

"DKode" <dk***@cfl.rr.com> wrote in message
news:b1**************************@posting.google.c om...
I have been researching a couple of different ways to accomplish a
master "Template" page, usually being default.aspx or index.aspx that
holds the repeating content of the site.

Most of the postings i've come across say they have a main page, and
all the subpages they create as a UserControl. i.e.: index.ascx,
contact.ascx and then by using a unique query string, they call the
usercontrols into the main page. i.e.:
http://www.mysite.com/index.aspx?page=contact

I am wondering what other options might be available that we can use
as it seems kind of strange to have to use UserControls for page
content. is there any other suggestions that people have employed that
work well?

I would greatly appreciate any comments anyone might have on this.

Nov 18 '05 #2

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

Similar topics

6
3309
by: Ben Ingram | last post by:
Hi all, I am writing a template matrix class in which the template parameters are the number of rows and number of columns. There are a number of reasons why this is an appropriate tradeoff for...
12
2597
by: mlimber | last post by:
This is a repost (with slight modifications) from comp.lang.c++.moderated in an effort to get some response. I am using Loki's Factory as presented in _Modern C++ Design_ for message passing in...
7
1913
by: Ioannis Vranos | last post by:
I have been checking C++/CLI lately by using VC++ 2005 Express Beta 1 (should be called Alpha though). In managed extensions we could pass managed pointers to functions taking unmanaged pointers...
10
10188
by: mast2as | last post by:
Is it possible to limit a template class to certain types only. I found a few things on the net but nothing seems to apply at compile time. template <typename T> class AClass { public:...
2
35494
weaknessforcats
by: weaknessforcats | last post by:
Handle Classes Handle classes, also called Envelope or Cheshire Cat classes, are part of the Bridge design pattern. The objective of the Bridge pattern is to separate the abstraction from the...
1
1489
by: Anonymous | last post by:
I have been trying to write a template class for a shared memory container, over the last few days - but I keep getting numerous compiler errors e.g: Error: syntax error : identifier...
0
1186
by: Anonymous | last post by:
I have been trying to write a template class for a shared memory container, over the last few days - but I keep getting numerous compiler errors e.g: Error: syntax error : identifier...
2
2188
by: Gary Nastrasio | last post by:
I'm currently reading Andrei Alexandrescu's book "Modern C++ Design" and I'm a bit confused by one bit of template syntax in chapter 1. Here is a code example: template <class CreationPolicy>...
5
1846
by: Daniel Pitts | last post by:
I have a template: template<typename t, int foo> class MyTemplate { public: template<typename bar> MyTemplate() { bar::something(foo); } }
0
7128
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
7332
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
7393
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...
1
7058
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...
1
5057
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...
0
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1565
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 ...
1
769
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.