Wrox Programmer Forums
|
BOOK: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution 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 June 10th, 2004, 09:25 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default Default Namespace (where is it?)

I hope this is not a DUMB question:

In the book page 57 it says:

To create this class, we add a class library project called PhilePageBase to our main solution. The default namespace should be Wrox.ThePhile.Web and the class file is called PhilePage.vb.

Where I go to set the default namespace to Wrox.ThePhile.Web?

In properties window I only see Custom Tool Namespace.

I don't think this is it.

Because when I set this and I tried to Imports Wrox.ThePhile.Web from another form I get the squiggly line under it.


I looked in 5 other books to see how and where to set the default namespace and no book mentions this.

How can I successful set the default namespace??????
HELP ME PLEASE :(:(
 
Old June 10th, 2004, 08:32 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The term "default namespace" is used by C# programmers - it's one of the project properties in C#.

In VB, you have a "root namespace" for your project, and it should be set to "Wrox". This effectively gets put onto the front of the namespace you specify in PhilePage.vb. So in PhilePage.vb, you don't specify the "Wrox.". He's the firest few lines of PhilePage.vb:

Imports System
Imports System.Web
Imports System.Web.UI
Imports System.Diagnostics

Imports Wrox.WebModules
Imports Wrox.WebModules.Accounts.Business

Namespace ThePhile.Web ' LOOK HERE

  Public Class PhilePage
    Inherits System.Web.UI.Page
 
Old June 11th, 2004, 03:52 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I wrote the above code and get a swiggly line at Imports Wrox.WebModules.
What is my problem?

Thank you for your reply. Please help me again.

 
Old June 11th, 2004, 09:45 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You don't have a reference to the DLLs of each module. This is a chicken-and-egg problem. You need a reference to each module's DLL to compile the project, but you can't make the DLLs until you first reference them!

The secret lies in the exact order of compilation. At each step, you only need to reference the items that have already been built. This assumes you haven't tampered with the order! It's possible to tamper with the order by accident.

If you do have the DLLs that came in the code download, the whole thing is simple because you will already have DLLs to match the references. At least, this would be fine if those DLLs work for you (this might depend on whether you have the same version of VS as the one used by the authors). As luck would have it, I couldn't use the author's DLLs, so I deleted them all and started again.

This is the hard manual procedure needed if you don't have the DLLs that came in the code download (or if you can't use those DLLs):
First, get in the habit of using Build..Rebuild Solution (at least until you get all the DLLs built). It will probably fail the first time (and maybe the first dozen times). After each failure, you can go to the Solution Explorer, find the references node, open that node, then see which references are broke and set them again. You probably can't fix them all the first time - you can only fix the references for the modules you have already built successfully. Fix as many as you can, and do another Rebuild Solution. Keep doing this until you get them all built.

Eric
 
Old June 12th, 2004, 03:50 AM
Registered User
 
Join Date: Jun 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Where I go to set the default namespace to Wrox.ThePhile.Web?
Just FYI, you can right-click on the class library Project and then Properties, you'll be able to enter the default namespace there (+Assembly)






Similar Threads
Thread Thread Starter Forum Replies Last Post
XmlWriter and default namespace miguel.ossa XML 11 December 4th, 2008 08:05 AM
default-xpath-namespace stolte XSLT 1 March 19th, 2008 12:49 PM
Default Namespace - XSLT 1.0 Geierwally XSLT 2 July 9th, 2007 11:08 AM
Dynamic Default Namespace EcceBozo XSLT 2 June 6th, 2007 04:05 PM
How can I change the default namespace allanhu BOOK: ASP.NET Website Programming Problem-Design-Solution 1 November 1st, 2004 01:15 PM





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