Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Suggestions for page template?


Message #1 by "Oliver, Wells" <WOliver@l...> on Mon, 9 Sep 2002 14:50:58 -0700
I have a page template that's rather cumbersome currently and I'm looking
for suggestions in revamping it.

It's cumbersome b/c it involves putting fixed cell widths and such in the
page itself, and then within these cells placing the user controls.

Example:
<intranet:header runat="server" />

<table border="0" width="100%" height="500" cellpadding="0" cellspacing="0">
<form name="selectLab" runat="server">
<tr valign="top" align="left">
<td width="200" bgcolor="#C0C0CF"><intranet:left runat="server" /></td>
<td>
..


So you can see, I have about fifty pages with that width of 200, and now I
find myself wanting to change the width to 100. It's a pain, because I have
to edit fifty some pages.

Can anyone help out in terms of suggestion that gets around this? I'm
thinking something involving XSLT but I'm not sure. Any tips appreciated.

Wells Oliver
Web Application Programmer
Leviton Voice & Data
xxx-xxx-xxxx
http://www.levitonvoicedata.com

Message #2 by "Andrew Bradnan" <andrew@w...> on Mon, 9 Sep 2002 15:37:50 -0700
My page template class loads 3 controls.  Header, footer, and the 
control for the page.

It's a tad more cumbersome to create the page, since I have to create a 
user control for each page, but then your change from 50 -> 100 takes 
about 3 seconds.  One day, I plan to load all the controls from string 
resource, and I won't have to ship any "web" code with my aspx projects.

Any "custom" changes to the header etc. I just handle in my overridden 
ProjectPageTemplate during the load.  For example, in the Page_Load I 
ask for the title of the page.  Then while I'm loading, I can set 
m_strTitle in the header user control.

Hope that gives you some ideas.
Andrew

http://whirly.info
.NET forums for developers

-----Original Message-----
From: Oliver, Wells [mailto:WOliver@l...]
Sent: Monday, September 09, 2002 2:51 PM
To: ASP+
Subject: [aspx] Suggestions for page template?


I have a page template that's rather cumbersome currently and I'm 
looking
for suggestions in revamping it.

It's cumbersome b/c it involves putting fixed cell widths and such in 
the
page itself, and then within these cells placing the user controls.

Example:
<intranet:header runat=3D"server" />

<table border=3D"0" width=3D"100%" height=3D"500" cellpadding=3D"0" 
cellspacing=3D"0">
<form name=3D"selectLab" runat=3D"server">
<tr valign=3D"top" align=3D"left">
<td width=3D"200" bgcolor=3D"#C0C0CF"><intranet:left runat=3D"server" 
/></td>
<td>
..


So you can see, I have about fifty pages with that width of 200, and now 
I
find myself wanting to change the width to 100. It's a pain, because I 
have
to edit fifty some pages.

Can anyone help out in terms of suggestion that gets around this? I'm
thinking something involving XSLT but I'm not sure. Any tips 
appreciated.

Wells Oliver
Web Application Programmer
Leviton Voice & Data
xxx-xxx-xxxx
http://www.levitonvoicedata.com


---

ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=3D1861007442

ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=3D1861007450

These books are a complete reference to the ASP.NET namespaces
for developers who are already familiar with using ASP.NET.
There is no trivial introductory material or useless .NET
hype and the presentation of the namespaces, in an easy-to use
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes,
giving you those real-world tips that the documentation doesn't
offer, and demonstrating complex techniques with simple
examples. 

---
Message #3 by "Dave Buckner" <Dave@N...> on Tue, 10 Sep 2002 12:47:31 -0500
Inheriting Page has proven to be useful to me for page templates. Check
out this article....

Page Templates [ASP.NET]
by Philip Quinn http://aspalliance.com/wisemonk/view.aspx?id=AN090302

Regards,
Dave

-----Original Message-----
From: Andrew Bradnan [mailto:andrew@w...] 
Sent: Monday, September 09, 2002 5:38 PM
To: ASP+
Subject: [aspx] RE: Suggestions for page template?


My page template class loads 3 controls.  Header, footer, and the
control for the page.

It's a tad more cumbersome to create the page, since I have to create a
user control for each page, but then your change from 50 -> 100 takes
about 3 seconds.  One day, I plan to load all the controls from string
resource, and I won't have to ship any "web" code with my aspx projects.

Any "custom" changes to the header etc. I just handle in my overridden
ProjectPageTemplate during the load.  For example, in the Page_Load I
ask for the title of the page.  Then while I'm loading, I can set
m_strTitle in the header user control.

Hope that gives you some ideas.
Andrew

http://whirly.info
.NET forums for developers

-----Original Message-----
From: Oliver, Wells [mailto:WOliver@l...]
Sent: Monday, September 09, 2002 2:51 PM
To: ASP+
Subject: [aspx] Suggestions for page template?


I have a page template that's rather cumbersome currently and I'm
looking for suggestions in revamping it.

It's cumbersome b/c it involves putting fixed cell widths and such in
the page itself, and then within these cells placing the user controls.

Example:
<intranet:header runat="server" />

<table border="0" width="100%" height="500" cellpadding="0"
cellspacing="0"> <form name="selectLab" runat="server"> <tr valign="top"
align="left"> <td width="200" bgcolor="#C0C0CF"><intranet:left
runat="server" /></td> <td> ..


So you can see, I have about fifty pages with that width of 200, and now
I find myself wanting to change the width to 100. It's a pain, because I
have to edit fifty some pages.

Can anyone help out in terms of suggestion that gets around this? I'm
thinking something involving XSLT but I'm not sure. Any tips
appreciated.

Wells Oliver
Web Application Programmer
Leviton Voice & Data
xxx-xxx-xxxx
http://www.levitonvoicedata.com


---

ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442

ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450

These books are a complete reference to the ASP.NET namespaces 
for developers who are already familiar with using ASP.NET. 
There is no trivial introductory material or useless .NET 
hype and the presentation of the namespaces, in an easy-to use 
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes, 
giving you those real-world tips that the documentation doesn't 
offer, and demonstrating complex techniques with simple 
examples.  

---

---

ASP.NET 1.0 Namespace Reference with C#
http://www.wrox.com/acon11.asp?ISBN=1861007442

ASP.NET 1.0 Namespace Reference with VB.NET
http://www.wrox.com/acon11.asp?ISBN=1861007450

These books are a complete reference to the ASP.NET namespaces 
for developers who are already familiar with using ASP.NET. 
There is no trivial introductory material or useless .NET 
hype and the presentation of the namespaces, in an easy-to use 
alphabetical order ensures a user-friendly reference format.
We provide in-depth coverage of all the major ASP.NET classes, 
giving you those real-world tips that the documentation doesn't 
offer, and demonstrating complex techniques with simple 
examples.  

---




  Return to Index