Wrox Programmer Forums
|
BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9
This is the forum to discuss the Wrox book Professional ASP.NET 3.5: In C# and VB by Bill Evjen, Scott Hanselman, Devin Rader; ISBN: 9780470187579
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 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 September 20th, 2009, 03:06 AM
Authorized User
 
Join Date: Apr 2009
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chap 1 pg 48 OpenStream not referencing

Hello,
I have just done the example on page 48 and the OpenStream is underlined in red.

I can't see that it is supposed to be delcared in the program and I can't see any values in the web.config file that say OpenStream so I suppose it is a referene to another file or the Stream wasn't declared properly.

My code is the same as the book.

Where does the Car.cs file reference the OpenStream variable from?

REgards

TOmche
 
Old September 20th, 2009, 08:11 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 tomche,

OpenStream is defined in the base class BuildProvider, that Car inherits from:

http://msdn.microsoft.com/en-us/libr...r_members.aspx

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old September 22nd, 2009, 09:42 AM
Authorized User
 
Join Date: Apr 2009
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Imar, but am I wrong in saying that the build providers are located in the web.config file?

This Chapter asks to start a class library so I don't have a web config file unless I create one. Also the chapter speaks of an AppCode folder on page 49.

Is there simething I haven't done?

Cheers

Tomche
 
Old September 22nd, 2009, 11:58 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You hook up extensions to build providers in web.config. The build provider itself resides in a class you define yourself.

If you create a web site or web application the code for Car.cs should work as is (in App_Code for a web site, in a different folder like Classes for a Web Application Project), as those projects contain a reference to System.Web out of the box which contains the base class for the buildprovider.

A class library could work as well, but you need to manually add a reference to System.Web using the Add Reference dialog.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chap 15 pg 532 tomche BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 10 April 2nd, 2010 03:37 PM
Chap 16 pg 562 MyProfile does see web.config tomche BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 July 28th, 2009 10:47 AM
return *this - Chap 8 pg 418 proslambano BOOK: Ivor Horton's Beginning Visual C++ 2005 0 March 10th, 2007 01:19 PM
Stuck on Chapter 2, pg 47-48 Clifton Thompson Beginning PHP 0 January 21st, 2006 08:29 PM





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