Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Professional ASP.NET 4 : in C# and VB
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Professional ASP.NET 4 in C# and VB by Bill Evjen, Scott Hanselman, Devin Rader; ISBN: 9780470502204
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 4 : in C# and VB 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 22nd, 2010, 07:48 PM
Registered User
Points: 8, Level: 1
Points: 8, Level: 1 Points: 8, Level: 1 Points: 8, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2010
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Cannot display Hello World correctly in a browser

I got the the Hello World section of chapter 2, and typed this into a new web site:
Code:
<div>
<h1>Hello World</h1>
<p>Welcome to Beginning ASP.NET 3.5 on <%= DateTime.Now.ToString() %></p>
<div>
CTRL-F5 opens IE with a blank page (URL=about.blank). If I close the browser, the browser reopens with the code as you see it above except with a space between each line (URL=http://localhost:3570/WebSite1/Default.aspx). If I right-click default.aspx and choose Firefox, Internet Explorer, or Internal Browser it also displays the source code as you see it above. In either case, the first time I run it after a reboot, a small window comes up showing:

ASP.NET Development Server
http://localhost:3570/WebSite1

I viewed the source in IE and it showed this:

Code:
<!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><title>
	Untitled Page
</title></head>
<body>
    <p>
        &lt;div&gt;</p>
    <p>
        &lt;h1&gt;Hello World&lt;/h1&gt;</p>
    <p>
        &lt;p&gt;Welcome to Beginning ASP.NET 3.5 on &lt;%= DateTime.Now.ToString() %&gt;&lt;/p&gt;</p>
    <p>
        &lt;div&gt;</p>
</body>
</html>
This happens if I'm running it from an administrator or non-administrator account, running Visual Studio 2008 Professional or Visual Web Developer 2008 Express.

Any ideas?
  #2 (permalink)  
Old May 23rd, 2010, 05:12 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Looks like you posted this in the wrong forum. The one for the Beginning book can be found here: http://p2p.wrox.com/book-beginning-asp-net-4-c-vb-560/

It also looks like you typed the code in Design View, not in Markup View. When you type in Design View, the code is converted so it can be dislayed as HTML, not interpreted as HTML. Type it again in Markup View and it should work.

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!
The Following User Says Thank You to Imar For This Useful Post:
Tofog (May 23rd, 2010)
 


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
Chapter 7. Unable to get sub menu to display correctly digitalsoul BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 8 October 30th, 2009 03:37 PM
cannot get title to display correctly ruairi ASP.NET 2.0 Basics 7 June 19th, 2007 08:28 AM
Browser cannot display fresh image. snowbydave1 Pro PHP 6 March 24th, 2007 04:55 AM
ForeColor doesn't display correctly. goldenstate ASP.NET 2.0 Basics 3 February 16th, 2007 12:36 PM



All times are GMT -4. The time now is 09:47 PM.


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