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

October 21st, 2010, 11:43 PM
|
Authorized User
|
|
Join Date: Feb 2010
Posts: 42
Thanks: 9
Thanked 0 Times in 0 Posts
|
|
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.
|

October 22nd, 2010, 08:06 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|

October 22nd, 2010, 09:04 AM
|
Authorized User
|
|
Join Date: Feb 2010
Posts: 42
Thanks: 9
Thanked 0 Times in 0 Posts
|
|
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.
|

October 22nd, 2010, 09:15 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|

October 22nd, 2010, 10:41 AM
|
Authorized User
|
|
Join Date: Feb 2010
Posts: 42
Thanks: 9
Thanked 0 Times in 0 Posts
|
|
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).
|

October 22nd, 2010, 10:55 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|
The Following User Says Thank You to Imar For This Useful Post:
|
|

October 22nd, 2010, 11:16 AM
|
Authorized User
|
|
Join Date: Feb 2010
Posts: 42
Thanks: 9
Thanked 0 Times in 0 Posts
|
|
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!
|

October 22nd, 2010, 11:36 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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
|

September 26th, 2011, 12:52 PM
|
Registered User
|
|
Join Date: Sep 2011
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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.
|
|
 |