Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 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 January 19th, 2007, 03:19 AM
Registered User
 
Join Date: Jan 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default why use <configSections> instead of <appSettings>?

hi guys, have some questions here:
- in chap3, we saw that the reason not using <appSettings> is to avoid the conflict of having same name on two different settings. is that the only reason?
- i found that many settings were hard-coded in configSection.cs. (for example, [ConfigurationProperty("mailSubject", DefaultValue="Mail from TheBeerHouse: {0}")]). why not leave it at web.config? actually, why not leave all the settings at web.config? after all, i thought that's why we need web.config. in this sample site, some settings are at configSection.cs and some at web.config, how do i decide what goes to what?
- at configSection.cs, we have this:
      public string DefaultConnectionStringName
      {
         get { return (string)base["defaultConnectionStringName"]; }
         set { base["connectionStdefaultConnectionStringNameringNa me"] = value; }
      }
i don't know how to come to the setter. what is this: connectionStdefaultConnectionStringNameringName?

hope i can get some answers. thanks!
 
Old January 20th, 2007, 03:30 PM
Registered User
 
Join Date: Jan 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it'd be greatly appreciated if anyone can help here. i need to understand this part to fully apply this feature. once again, thanks in advance!!

 
Old January 28th, 2007, 01:26 AM
Authorized User
 
Join Date: Jan 2007
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well for starters, this statement is incorrect:

set { base["connectionStdefaultConnectionStringNameringNa me"] = value; }

it should, expectedly, be:

set { base["defaultConnectionStringName"] = value; }

This was a typo that was filed in the Errata for the book. However, that's about all I can help you with since I have the same questions as to why he has this class, but still uses the web.config for some stuff. More specifically, why is he using base["member"] indexers instead of just using this.member? Or even, base.member? I guess my question should be in a new post...

 
Old January 28th, 2007, 01:55 PM
Registered User
 
Join Date: Jan 2007
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks oooshola for pointing out the typo! finally i got a response.

 
Old January 28th, 2007, 08:35 PM
Authorized User
 
Join Date: Jan 2007
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No prob--I just hope I can help more people and be helped myself, now that I just joined the forum. I'm still in chapter 3! I know I have a looong way to go.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 8: <asp:image> inside <a> & ext.CSS (pg. 274) epc BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 July 12th, 2008 04:37 AM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
<marquee><b>About CHAT App. in PHP4</b></marquee> Ramkrishna PHP How-To 1 September 11th, 2004 07:01 AM
<STRONG> vs <B> and <EM> vs <I> anshul HTML Code Clinic 12 September 1st, 2004 05:22 PM
a problem in book<<beginning asp.net using vb>> luoware ASP.NET 1.0 and 1.1 Basics 3 December 8th, 2003 09:32 PM





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