Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 9th, 2008, 03:57 AM
Authorized User
 
Join Date: Jun 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to workidoo
Default 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"?

http://www.workidoo.com
__________________
http://www.workidoo.com
 
Old June 9th, 2008, 05:43 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.
 
Old June 9th, 2008, 07:31 AM
Authorized User
 
Join Date: Jun 2008
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to workidoo
Default

Thx!

http://www.workidoo.com
 
Old June 24th, 2008, 10:45 PM
Registered User
 
Join Date: Jun 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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




 
Old June 25th, 2008, 12:15 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.
 
Old June 25th, 2008, 12:43 PM
Registered User
 
Join Date: Jun 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
 
Old June 25th, 2008, 04:58 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

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.





Similar Threads
Thread Thread Starter Forum Replies Last Post
creating custom page ajindal General .NET 2 July 19th, 2006 05:17 AM
How to make GUI reusable in .NET hums .NET Framework 2.0 0 October 20th, 2004 12:09 AM
Need help creating reusable code in a class. jbenson001 ASP.NET 1.x and 2.0 Application Design 1 November 21st, 2003 01:07 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.