Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 9th, 2008, 03:57 AM
Authorized User
 
Join Date: Jun 2008
Location: , , .
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
Reply With Quote
  #2 (permalink)  
Old June 9th, 2008, 05:43 AM
Imar's Avatar
Wrox Author
Points: 72,019, Level: 100
Points: 72,019, Level: 100 Points: 72,019, Level: 100 Points: 72,019, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,075
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
  #3 (permalink)  
Old June 9th, 2008, 07:31 AM
Authorized User
 
Join Date: Jun 2008
Location: , , .
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to workidoo
Default

Thx!

http://www.workidoo.com
Reply With Quote
  #4 (permalink)  
Old June 24th, 2008, 10:45 PM
Registered User
 
Join Date: Jun 2008
Location: , , .
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




Reply With Quote
  #5 (permalink)  
Old June 25th, 2008, 12:15 AM
Imar's Avatar
Wrox Author
Points: 72,019, Level: 100
Points: 72,019, Level: 100 Points: 72,019, Level: 100 Points: 72,019, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,075
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
  #6 (permalink)  
Old June 25th, 2008, 12:43 PM
Registered User
 
Join Date: Jun 2008
Location: , , .
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.
Reply With Quote
  #7 (permalink)  
Old June 25th, 2008, 04:58 PM
Imar's Avatar
Wrox Author
Points: 72,019, Level: 100
Points: 72,019, Level: 100 Points: 72,019, Level: 100 Points: 72,019, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,075
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 06:02 PM.


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