Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Professional ASP.NET 4 : in C# and VB
|
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 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 May 22nd, 2010, 07:48 PM
Registered User
 
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?
 
Old May 23rd, 2010, 05:12 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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)





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





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