Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 19th, 2007, 03:19 AM
Registered User
 
Join Date: Jan 2007
Location: , , .
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!
  #2 (permalink)  
Old January 20th, 2007, 03:30 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
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!!

  #3 (permalink)  
Old January 28th, 2007, 01:26 AM
Authorized User
 
Join Date: Jan 2007
Location: , , .
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...

  #4 (permalink)  
Old January 28th, 2007, 01:55 PM
Registered User
 
Join Date: Jan 2007
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

  #5 (permalink)  
Old January 28th, 2007, 08:35 PM
Authorized User
 
Join Date: Jan 2007
Location: , , .
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.

 


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
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



All times are GMT -4. The time now is 08:44 AM.


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