Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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 Search this Thread Display Modes
  #1 (permalink)  
Old January 29th, 2010, 06:40 PM
Registered User
 
Join Date: Jan 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default getting started with your book

hello,
I just tried to do the first hello world exersice. I triple checked the code and enabled the intranet settings but when IE opens it just shows the original code that I typed. Is there something else I need to do with IE 8?
thanks!
Reply With Quote
  #2 (permalink)  
Old January 29th, 2010, 07:17 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

What's the exact address of the page in the address bar of the browser? And how did you open the file in your browser?

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 January 29th, 2010, 07:29 PM
Registered User
 
Join Date: Jan 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The address is http://localhost:49770/WebSite3/Default.aspx
I just pressed debug and this page opened up with the same code.

When I pressed debug a message appears
Reply With Quote
  #4 (permalink)  
Old January 29th, 2010, 07:31 PM
Registered User
 
Join Date: Jan 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The address is http://localhost:49770/WebSite3/Default.aspx
I just pressed debug and this page opened up with the same code.

When I pressed debug a message appears

The page cannot be run in debug mode because debugging in not enabled in the Webconfig file. What would you like to do?

-modify the webconfig file to allow debugging?

or

-run without debugging

I chose option 1 and that's what happened
Reply With Quote
  #5 (permalink)  
Old January 30th, 2010, 06:00 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

You shouldn't press Debug at this stage yet, but simply press Ctrl+F5 to start without debugging. However, both methods should work fine.

Can you post the code for the page and its Code Behind?

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
  #6 (permalink)  
Old January 30th, 2010, 10:02 PM
Registered User
 
Join Date: Jan 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here's the code. Thanks for your help! It still doesn't work when I press ctrl F5
Thanks

<h1>Hello World</h1>
<p>Welcome to Beginning ASP.NET 3.5 on <%= DateTime.Now.ToString ( ) %></p>


<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" 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 runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>

&lt;h1&gt;Hello World&lt;<span lang="en-us"> /</span>h1&gt;<br />
&lt;p&gt;Welcome to Beginning ASP.NET 3.5 on <span lang="en-us">&nbsp;</span>&lt;%=
DateTime.Now.ToString<span lang="en-us"> </span>( ) <span lang="en-us">&nbsp;</span>%&gt;&lt;/p&gt;</div>
</form>
</body>
</html>
Reply With Quote
  #7 (permalink)  
Old January 31st, 2010, 05:15 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

There are two things wrong with this code:

1.
Code:
<h1>Hello World</h1>
<p>Welcome to Beginning ASP.NET 3.5 on  <%= DateTime.Now.ToString ( )  %></p>
This part shouldn't be *above* the page directive, but between the <form> and <div> tags

2.
Code:
 
&lt;h1&gt;Hello World&lt;<span lang="en-us"> /</span>h1&gt;<br />
&lt;p&gt;Welcome to Beginning ASP.NET 3.5 on <span lang="en-us">&nbsp;</span>&lt;%= 
DateTime.Now.ToString<span lang="en-us"> </span>( ) <span lang="en-us">&nbsp;</span>%&gt;&lt;/p&gt;</div>
You typed this in *Design View* so your HTML gets encoded. Take another look at the instructions to see how you should enter this in Markup View, or use the tools like the formatting toolbar.

To fix it: move the correct HTML above the <%@ Page directive to within the <div> tags, and remove whatever you currently have in those <div> tags....

You should end up with something like this:

Code:
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" 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 runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
  <h1>Hello World</h1>
  <p>Welcome to Beginning ASP.NET 3.5 on  <%= DateTime.Now.ToString ( )  %></p>
</div>
</form>
</body>
</html>
Hope this helps,

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
  #8 (permalink)  
Old January 31st, 2010, 01:45 PM
Registered User
 
Join Date: Jan 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

thanks Imar!
Reply With Quote
  #9 (permalink)  
Old January 31st, 2010, 03:30 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Does it work now? What was the issue exactly?

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
  #10 (permalink)  
Old January 31st, 2010, 04:41 PM
Registered User
 
Join Date: Jan 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

you were right i was in the wrong view.
thanks again!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Getting Started R1chardK Perl 2 August 19th, 2009 11:22 PM
Can't get started shanebbb BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 17 December 24th, 2008 04:58 AM
Getting started sg48 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 February 10th, 2008 02:36 AM
Can not get started eliea ASP.NET 1.0 and 1.1 Basics 3 July 19th, 2003 12:11 AM
Help Getting Started Bob Bedell JSP Basics 1 July 15th, 2003 11:06 PM



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


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