Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 February 25th, 2010, 03:47 PM
Authorized User
 
Join Date: Oct 2009
Posts: 40
Thanks: 4
Thanked 0 Times in 0 Posts
Default Really annoying simple errors I cannot get past.Help Please!

I recently purchased 'Beginning ASP.net 3.5 in c# as I had read good things about it. I am new to programming and Im on chapter 3 and continue to get the same errors every time I try to build:

Warning 1 File 'Default.aspx.cs' was not found. C:\BegASPNET\Site\Default.aspx 1 58 C:\BegASPNET\Site\

Warning 2 File 'CodeBehind.aspx.cs' was not found. C:\BegASPNET\Site\Demos\CodeBehind.aspx 1 57 C:\BegASPNET\Site\


Error 3 The file '/Site/Demos/CodeBehind.aspx.cs' does not exist. C:\BegASPNET\Site\Demos\CodeBehind.aspx 1

Error 4 The file '/Site/Demos/TableDemo.aspx.cs' does not exist. C:\BegASPNET\Site\Demos\TableDemo.aspx 1

Error 5 The file '/Site/Demos/CssDemo.aspx.cs' does not exist. C:\BegASPNET\Site\Demos\CssDemo.aspx 1


I dont understand why I continue to get these errors, I have followed the chapter and book step by step. I have even now tried to use all the source code available from this site and copied that over my code as i tHought there may be something wrong with how ive entered the code but still exactly the same errors. Can someone please help me get past this. Im sure its something simple but Its stopping me getting on with the chapter and book!!! HELP PLEASE.

Lee
 
Old February 25th, 2010, 05:31 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Lee,

You've come to the right place for help ;-)

But in order to help you, I need a bit more information. How are you opening the web site in Visual Web Developer (e.g. when you choose File | Open Web Site, what folder do you browse to and open? Are you sure you created a Web Site Project and not a Web Application Project? And can you post the code and its Code Behind of the CodeBehind.aspx page? And finally, how did you create this page? Can you describe the steps?

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!
 
Old February 25th, 2010, 05:34 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

BTW, I just looked at your older posts, and it seems we were having a similar discussion in October last year. You posted a similar question and I replied with similar questions. I take it that at that time you didn't resolve the problem?

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!
 
Old February 25th, 2010, 07:43 PM
Authorized User
 
Join Date: Oct 2009
Posts: 40
Thanks: 4
Thanked 0 Times in 0 Posts
Default

I am going FILE/OPEN PROJECT and browsing to my website from there. Yes I had this exact problem I never got past in October. I had a study break for the past 4 months due and am getting back to it but cant get past the same problem again despite following the chapter carefully.


Heres the codebehind code:
Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CodeBehind.aspx.cs" Inherits="Demos_CodeBehind" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
  <title>Untitled Page</title>
</head>
<body>
  <form id="form1" runat="server">
  <div>
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
  </div>
  </form>
</body>
</html>
and heres the default page code:
Code:
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
  <title>Untitled Page</title>
  <link href="Styles/Styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <form id="form1" runat="server">
  <div id="PageWrapper">
    <div id="Header">Header Goes Here</div>
    <div id="MenuWrapper">Menu Goes Here</div>
    <div id="MainContent">
    <h1>Hi there visitor and welcome to Planet Wrox</h1>
    <p class="Introduction">
      We're glad you are paying a visit to <a href="http://www.PlanetWrox.com">
      www.PlanetWrox.com</a>, the coolest music community site on the Internet.
    </p>
    <p class="Introduction">
      Feel free to have a <a href="Default.aspx">look around</a>; as there are lots of interesting <b>reviews and concert
      pictures</b> to be found here.
    </p>
    </div>
    <div id="Sidebar">Sidebar Goes Here</div>
    <div id="Footer">Footer Goes Here</div>
  </div>
  </form>
</body>
</html>
I followed the book carefully as it said and started getting these errors throughout chapter 3 and im not sure why. Nothing will compile without these 5 simple errors.

Lee
 
Old February 25th, 2010, 09:07 PM
Authorized User
 
Join Date: Oct 2009
Posts: 40
Thanks: 4
Thanked 0 Times in 0 Posts
Default

I am going FILE/OPEN PROJECT and browsing to my website from there. Yes I had this exact problem I never got past in October. I had a study break for the past 4 months due and am getting back to it but cant get past the same problem again despite following the chapter carefully.


Heres the codebehind code:
Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CodeBehind.aspx.cs" Inherits="Demos_CodeBehind" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
  <title>Untitled Page</title>
</head>
<body>
  <form id="form1" runat="server">
  <div>
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
  </div>
  </form>
</body>
</html>
and heres the default page code:
Code:
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
  <title>Untitled Page</title>
  <link href="Styles/Styles.css" rel="stylesheet" type="text/css" />
</head>
<body>
  <form id="form1" runat="server">
  <div id="PageWrapper">
    <div id="Header">Header Goes Here</div>
    <div id="MenuWrapper">Menu Goes Here</div>
    <div id="MainContent">
    <h1>Hi there visitor and welcome to Planet Wrox</h1>
    <p class="Introduction">
      We're glad you are paying a visit to <a href="http://www.PlanetWrox.com">
      www.PlanetWrox.com</a>, the coolest music community site on the Internet.
    </p>
    <p class="Introduction">
      Feel free to have a <a href="Default.aspx">look around</a>; as there are lots of interesting <b>reviews and concert
      pictures</b> to be found here.
    </p>
    </div>
    <div id="Sidebar">Sidebar Goes Here</div>
    <div id="Footer">Footer Goes Here</div>
  </div>
  </form>
</body>
</html>
I followed the book carefully as it said and started getting these errors throughout chapter 3 and im not sure why. Nothing will compile without these 5 simple errors.

Lee
 
Old February 26th, 2010, 05:00 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Quote:
I am going FILE/OPEN PROJECT and browsing to my website from there.
In that case, you chose the wrong project type and are not following the book's steps exactly. Take another look at page 37, step 2. It says:

Choose File | New Web Site

and not File | New Project.

There's a big difference between the two. Refer to page 34 for a discussion between a Web Site Project and a Web Application Project. You should probably start over in Chapter 2, or use the downloadable source from that chapter as the starting point for chapter 3.

If this doesn't fix the issue. can you be more specific and provide some detailed answers to my earlier questions? "I am going FILE/OPEN PROJECT and browsing to my website from there." is not that specific as "my website from there" could mean anything. In VWD, there's quite a difference in behavior if you open your website as C:\BegASPNET and then browse to http://localhost:12345/Site or open it from C:\BegASPNET\Site and browse to it as http://localhost:12345. (The latter is correct.) The more specific details you provide, the better I can help you out.

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help with Annoying error super007 Classic ASP Databases 6 September 26th, 2007 12:56 AM
Extremely annoying VS.Net behavior katsarosj VS.NET 2002/2003 6 April 17th, 2006 09:21 AM
Small (yet annoying) gap gkirk CSS Cascading Style Sheets 2 June 1st, 2005 04:43 PM
Simple query errors Justine Access 5 February 12th, 2004 09:43 AM





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