Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 2010 > BOOK: Beginning Microsoft Visual Basic 2010
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Microsoft Visual Basic 2010
This is the forum to discuss the Wrox book Beginning Visual Basic 2010 by Thearon Willis, Bryan Newsome; ISBN: 9780470502228
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft Visual Basic 2010 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 January 5th, 2011, 07:32 AM
Registered User
 
Join Date: Jan 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 17 The very first Try it out.

Hi, My first thread and i hope you can help.

The first try it out : Creating A Dynamic Data LINQ to SQL Web Site.

STEP 4 : When i right-click the solution name to add an "App_Code" folder there is no option to do so.

From the menu list of "Add ASP.NET Folder" i only have the following options;
App_GlobalResources
App_LocalResources
App_data (greyed out as its already added)
Browsers
Theme

Any ideas?

Also, Step 3 adding the pubs.mdf to the App_data folder. I had to stop SQL server to accomplish this. Am i right in thinking that's the only way to do it? as its not ideal.

Many thanks in advance
Reply With Quote
  #2 (permalink)  
Old January 7th, 2011, 11:34 AM
Registered User
 
Join Date: Jan 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, I have created a new folder manually and called it App_Code, when created it didnt look like the normal yellow folder, it had a bitmap more inline with the other special folders so that seems ok now. However a further problem i just cant get my head around yet ;

STEP 8 amending the global.asax file.
I have made the changes according to the steps, but i am seeing an error saying that "Type PubsDataContext is not defined".
Code:
 DefaultModel.RegisterContext(GetType(PubsDataContext), New ContextConfiguration() With {.ScaffoldAllTables = True})
Any help will be appreciated as this single problem has stopped me in my tracks.

Last edited by hully333; January 7th, 2011 at 12:19 PM..
Reply With Quote
  #3 (permalink)  
Old January 9th, 2011, 05:22 PM
Registered User
 
Join Date: Jan 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Having had another look at it ;

The App_code folder contains ;
Pubs.dbml
which in turn contains ;
Pubs.designer.vb
Within that code there is a partial public class called PubsDataContext
Code:
<Global.System.Data.Linq.Mapping.DatabaseAttribute(Name:="pubs")> _
Partial Public Class PubsDataContext
    Inherits System.Data.Linq.DataContext
However as stated in my previous post, i am seeing an error within default.asax.vb saying that PubsDataContext is not defined.

Any help would be appreciated.

Thanks in advance

Last edited by hully333; January 9th, 2011 at 05:26 PM..
Reply With Quote
  #4 (permalink)  
Old January 10th, 2011, 10:51 AM
Registered User
 
Join Date: Jan 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok, Its now sorted. When I created the new project I chose Web Application from the start page, instead of File-New Web Site. So there are subtle differences using the DynamicData Webs between WebApps and WebSites.

Thanks for all the help.
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
Errata Chapter 17 sahyouni ASP.NET 2.0 Professional 1 July 9th, 2009 06:07 AM
Chapter 17 HenzFast BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 2 April 14th, 2009 03:28 AM
Chapter 17 First Try It Out paloyme BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 7 August 23rd, 2006 11:14 AM
Chapter 17 first Try It Out paloyme Visual Basic 2005 Basics 0 April 17th, 2006 04:34 AM
Chapter 17 Gaby BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 3 September 8th, 2005 11:50 AM



All times are GMT -4. The time now is 09:25 PM.


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