Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 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 July 7th, 2006, 08:17 AM
Registered User
 
Join Date: Jul 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default chapter 03 ..i am getting error messages

In BegASPNET2\Begin\Copy of Chapter03\Samples\ServerControls.aspx
The section bold and higthlight in green, i get an error messsage as seen below the page, but when remove ~/ in front of the jpeg file(azoreschurch.jpg) i get no errors.
i thought ~/ was valid to files that is local to the project, on the server side.

So, Y do i get error messages?

<%@ Page Language="VB" %>

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

<script runat="server">

</script>

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
      <asp:Image ID="MyImage" runat="server" ImageUrl="~/azoreschurch.jpg" /><br />
      <asp:HyperLink ID="HyperLink1" runat="server"
           NavigateUrl="www.wroxunited.net">Visit Wrox United Online!</asp:HyperLink>
    </div>
    </form>
</body>
</html>

These are errors i get:
Error 1 File 'www.wroxunited.net' was not found. C:\Documents and Settings\t\My Documents\BegASPNET2\Begin\Copy of Chapter03\Samples\ServerControls.aspx 19 25 C:\...\Copy of Chapter03
Error 2 File '~/azoreschurch.jpg' was not found. C:\Documents and Settings\t\My Documents\BegASPNET2\Begin\Copy of Chapter03\Samples\ServerControls.aspx 17 56 C:\...\Copy of Chapter03

 
Old July 17th, 2006, 03:01 PM
Registered User
 
Join Date: Jun 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Wullie
Default

IN respect to the www.wroxunited.net link you are linking to a new page. This will require the http protocol so you need to ensure that the link is http://www.wroxunited.net. Otherwise, you are basically asking the server to find a file relative to your curently location called www.wroxunited.net, which of course does not exist.

I'm not sure why your getting the error with the image link. Your right about the ~/, this, when used on a server control, will point to the root of the current project at runtime.

There are only 10 kinds of people.
Those who understand binary...and those who don't!





Similar Threads
Thread Thread Starter Forum Replies Last Post
A caution for users at Chapter 5, Ex. 03 Prism BOOK: Ivor Horton's Beginning Visual C++ 2005 1 April 14th, 2008 02:32 AM
Chapter 03- Chat Server Configuration Error danielson BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 10 March 27th, 2007 11:50 AM
chapter 03 ..i am getting error messages realiest BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 July 7th, 2006 08:17 AM
Outlook '03 automation from Access '03 error Derek_05 Access VBA 2 February 3rd, 2006 06:09 AM
Beginning Visual C# Exercises - Chapter 03 seblake C# 1 July 19th, 2004 09:16 AM





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