Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7
This is the forum to discuss the Wrox book Beginning Microsoft Visual Basic 2008 by Thearon Willis, Bryan Newsome; ISBN: 9780470191347
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 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 Display Modes
  #1 (permalink)  
Old October 22nd, 2010, 12:43 AM
Authorized User
 
Join Date: Feb 2010
Location: Annapolis, MD USA
Posts: 42
Thanks: 9
Thanked 0 Times in 0 Posts
Default Chapter 18: table id code does not work

On page 639, this is written:
<table id="tblMasterLayoutHeader" class="TableLayout" .........

The error I get is: Element "id" is not supported. I have searched the web and have not figured out what the author meant or how this should be updated for XHTML. Please help.
Reply With Quote
  #2 (permalink)  
Old October 22nd, 2010, 09:06 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,955
Thanks: 79
Thanked 1,556 Times in 1,533 Posts
Default

Hi there,

Is that the exact error message? And is there other code around this that might cause the problem? The error mentions an *id element* while your code shows an *id attribute*...

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!
Reply With Quote
  #3 (permalink)  
Old October 22nd, 2010, 10:04 AM
Authorized User
 
Join Date: Feb 2010
Location: Annapolis, MD USA
Posts: 42
Thanks: 9
Thanked 0 Times in 0 Posts
Default Chapter 18

The code:
Code:
<body bgcolor="#cc0000">
    <form id="form1" runat="server">
    <div>
        <table id="tblMasterLayoutHeader" class="TableLayout" cellpadding="0" 
            cellspacing="0" align="center">
The error:
Validation (XHTML 1.0 Transitional): Text is not allowed between the opening and closing tags for element table.
Reply With Quote
  #4 (permalink)  
Old October 22nd, 2010, 10:15 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,955
Thanks: 79
Thanked 1,556 Times in 1,533 Posts
Default

That's a different error, and seems to be related to code defined *after* the opening table tag. Can you post the complete code for the page? Makes it easier to see what's going on.

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!
Reply With Quote
  #5 (permalink)  
Old October 22nd, 2010, 11:41 AM
Authorized User
 
Join Date: Feb 2010
Location: Annapolis, MD USA
Posts: 42
Thanks: 9
Thanked 0 Times in 0 Posts
Default Chapter 8

Code:
<%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
    .TableLayout {width: 700px; background-color:#ffcc66;}
    .border{border-style:solid; border-color:black; border-width:thin;}
    </style>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>
</head>
<body bgcolor="#cc0000">
    <form id="form1" runat="server">
    <div>
        <table id="tblMasterLayoutHeader" class="TableLayout" cellpadding="0" 
            cellspacing="0" align="center"> 
            <!-- height="450" -->
            <tr>
                <td style="width: 100px" rowspan="2" class="border">
                <!-- Add the menu to the page -->
                    <asp:Menu ID="Menu1" Runat="server" >
                        <Items>
                            <asp:MenuItem Value="Home" Text="Home" 
                                NavigateUrl="Default.aspx"></asp:MenuItem>
                            <asp:MenuItem Value="News" Text="News" 
                                NavigateUrl="News.aspx">
                                    <asp:MenuItem Value="Today" Text="Today" 
                                       NavigateUrl="NewsToday.aspx"></asp:MenuItem>
                                    <asp:MenuItem Value="Yesterday" Text = 
                                       "Yesterday" NavigateUrl=
                                       "NewsYesterday.aspx"></asp:MenuItem>
                            </asp:MenuItem>
                            <asp:MenuItem Value="Events" Text="Events" 
                                NavigateUrl="Events.aspx"></asp:MenuItem>
                            <asp:MenuItem Value="Contact Us" Text="Contact Us" 
                                NavigateUrl="Contact.aspx"></asp:MenuItem>
                        </Items>
                    </asp:Menu>
                </td>
                <td bgcolor="#000000" class="border" >
                    <!-- Main title -->
                    <asp:Label ID="Label1" Runat="server" Text="Beginning Visual 
                        Basic 2008" Font-Names="Arial" Font-Bold="true" 
                        ForeColor="#ffcc33" Font-Size="28pt" />
                </td>
            </tr>
            <tr>
                <td class="border">
                    <!-- Site map path under Title -->
                    <asp:SiteMapPath ID="smpMain" Runat="server"></asp:SiteMapPath>
                </td>
            </tr>
            <tr>
                <td class="border" colspan="2" height="100%" valign="top" 
                    align="center">
                    <!-- All site content will go here -->
                    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
                    </asp:ContentPlaceHolder>
                </td>
            </tr>
            <tr>
                <td class="border" align="center" colspan="2">
                    <!-- Footer -->
                    <asp:Label ID="Label2" Runat="server" Text="©2008, All rights 
                        reserved." Font-Names="Arial" Font-Bold="true" 
                        ForeColor="black" Font-Size="10pt" ></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
This is copied right out of the book, except I fixed these errors:
1. I changed <Style> to <style type="text/css"> - I don't know what this does but it wouldn't work unless changed.
2. I deleted height="450" from line 19 - error said "Attribute 'height' is not a valid attribute of element 'table'." I turned it into a comment.
3. I changed </Style> to </style> - capitals not allowed here.

I still get warning messages:
1. Attribute 'bgcolor' is considered outdated (line 15 & 43).
2. Attribute 'height' is considered outdated (line 57).
3. Attribute 'align' is considered outdated (line 19).
Reply With Quote
  #6 (permalink)  
Old October 22nd, 2010, 11:55 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,955
Thanks: 79
Thanked 1,556 Times in 1,533 Posts
Default

Again, you're posting a new error message. Is the old one resolved? It's a bit difficult to help you if the problem keeps changing... ;-)

Anyway, those "errors" are just warnings. bgcolor is indeed outdated, and can be replaced with a style:

<body style="background-color: #cc0000">

Alternatively, you can move it to a style sheet:

body
{
background-color: #cc0000;
}

I doubt that these problems are a problem at the moment, as I think the book deals more with Visual Basic than with HTML and CSS, right? Not sure, as I don't know the book.

If you want to learn (a lot) more about ASP.NET, check out my book Beginning ASP.NET 4 (see links in my signature). It deals with this stuff extensively.

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!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
demac3 (October 22nd, 2010)
  #7 (permalink)  
Old October 22nd, 2010, 12:16 PM
Authorized User
 
Join Date: Feb 2010
Location: Annapolis, MD USA
Posts: 42
Thanks: 9
Thanked 0 Times in 0 Posts
Default Chapter 18

You have been very patient with me and I appreciate it. Although I have been in the IT field for most of my life, web development is new to me.

My intention is to build a robust web application using VB and data from SQL Server. I never thought I would be creating web sites, however. I viewed a web site as a URL for my business with a hypelink to get to the web application I would write in VB. Someone else is tasked with the business web site and I am tasked with the web application. I'm beginning to think my first step is to understand these terms a little better. Is the first page of my application (the login page) a web site? Are the following modal pages also web sites?

Finally, is your book Beginning ASP.NET 4 in C# and VB the best book to get me where I want to go? Thanks so much for your time!
Reply With Quote
  #8 (permalink)  
Old October 22nd, 2010, 12:36 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,955
Thanks: 79
Thanked 1,556 Times in 1,533 Posts
Default

Quote:
is your book Beginning ASP.NET 4 in C# and VB the best book to get me where I want to go?
If you want to learn how to build dynamic web sites using ASP.NET and C# or VB (I assume VB in your case), then yes, I think my book is the best book to get you there. Check out the reviews on Amazon.com to read other, unbiased reviews about it:

http://www.amazon.com/Beginning-ASP-...dp/0470502215/
http://www.amazon.co.uk/Beginning-AS...dp/0470502215/

I think web site is a bit of a bloated term. In general, it's everything behind a domain name. E.g. www.wrox.com and p2p.wrox.com are (probably) two different websites, and so are www.amazon.co.uk and amazon.com.

In ASP.NET and Visual Studio terms, a web site (also called a Web Site Project) is a collection of files in a folder that you can view through a web server. Additionally, Visual Studio has the concept of a Web Application Project which is a web site as well (when referring to the general definition of a web site), but uses a project structure rather like a Windows Forms application to keep all files together.

I'd say that what you are referring to are called web pages instead. Many web pages logically grouped together make up a web site.

My book talks about this stuff in depth. You can get the first chapter for free from the book's details page: http://www.wrox.com/WileyCDA/WroxTit...470502215.html

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!
Reply With Quote
  #9 (permalink)  
Old September 26th, 2011, 01:52 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default While I've already read Beginning ASP.NET 3.5

While I've already read Beginning ASP.NET 3.5 by Imar Spaanjaars and moved rather far beyond it, when I had the opportunity to recieve his new book on ASP.NET 4 for review, I took it.

Would I still feel strongly about recommending his work as *the* #1 choice for those new (or relatively new) to ASP.NET? Would it offer enough new content over the previous iteration that I'd recommend a new purchase if someone had the first?

===

First, if you're just getting started with ASP.NET, this is once again *the* book to start with. The way the book reads makes it extremely easy to keep up with where he's at, and why. At the end you'll end up with a functional site, having built it yourself, using a good deal of ASP.NET functionality.

The book also assumes little experience with HTML and CSS, which makes this book a fairly good start for anyone who wants to get started with creating Web sites (using ASP.NET), even going into the developer tool Visual Web Developer 2010.

The book itself is a *vast* improvement over previous iterations, with a much more solid wrap and softer (but still thick) pages. (Although the pages must be somewhat thinner, since the previous iteration of this book is about the same depth as this one, even though this has ~70 more pages.)

The guitar on the cover has left me guessing a bit, all the way from 'rock star' to 'hero' to 'he creates a music-related site' but if you don't get stuck on such things, you'll be fine.
Reply With Quote
Reply


Thread Tools
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
chapter 18 code problem hennie7863 BOOK: Professional Microsoft SQL Server 2008 Integration Services ISBN: 978-0-470-24795-2 1 September 9th, 2010 04:33 PM
Chapter 18 code compile problem warlock7 BOOK: Ivor Horton's Beginning Visual C++ 2005 8 January 3rd, 2008 10:04 AM
Chapter 18 code won't compile warlock7 Visual C++ 2005 0 January 18th, 2007 04:10 PM
Source Code for Chapter 18 KeithM BOOK: Access 2003 VBA Programmer's Reference 3 August 13th, 2004 12:53 PM



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


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