p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 (http://p2p.wrox.com/forumdisplay.php?f=389)
-   -   Creating Reusable Page Templates (http://p2p.wrox.com/showthread.php?t=68678)

workidoo June 9th, 2008 03:57 AM

Creating Reusable Page Templates
 
Hello,

Have just completed Chapter 6 of the book. However, I have a little hard to understand "Creating Reusable Page Templates", so I wonder if there is any site where you can get a little deeper info on this?

Do not really know what is the point of "MyBasePage.aspx"? [V]

http://www.workidoo.com

Imar June 9th, 2008 05:43 AM

Hi there,

Isn't that clear enough from the text?

The point is that after creating a page template you can choose File | Add | New Item and then choose your custom page template.

This way, you get a jump start in creating new pages where stuff you often need (a hooked up MasterPage, Content placeholders, some code in the code behind, inheriting from your custom BasePage and so on) is already in place without the need to add it every time again and again.

Hope this helps,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.

workidoo June 9th, 2008 07:31 AM

Thx!

http://www.workidoo.com

shaileshj June 24th, 2008 10:45 PM

On that same topic Imar..., whenever I manually chose the theme (Monochrome or DarkGrey) on website level, I had to modify the web.config file to say
<Page theme ="Monochrome"> or <Page theme = "DarkGrey">. I understand this.

When it comes to dynamically setting up the theme, it's implemented by the cookie in the master page and its code behind page.

I don't understand why you don't go back to modify the web.config file? The latter file is still coded to the last chosen manual option i.e <Page theme= "DarkGrey">. I'm trying to debug my code, and I'm wondering whether this might be an issue.

Thanks!
Shailesh





Imar June 25th, 2008 12:15 AM

Quote:

quote:I don't understand why you don't go back to modify the web.config file?
I do. Check page 227, step 4.
Also, page 662 has a little reminder for this....


Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.

shaileshj June 25th, 2008 12:43 PM

Thanks! I just remove the "theme" all together from the <pages> (not just the styleSheetTheme) in the web.config file, and it still works great. I figure out it's working because now the theme selection is built-in the master page.

Shailesh

Quote:

quote:Originally posted by Imar
 
Quote:

quote:I don't understand why you don't go back to modify the web.config file?
I do. Check page 227, step 4.
Also, page 662 has a little reminder for this....


Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.

Imar June 25th, 2008 04:58 PM

Just realize that, as I wrote in the book, you now loose Design Time support in VWD as the IDE no longer knows what theme you are using.

Cheers,

Imar

---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.


All times are GMT -4. The time now is 09:14 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.