Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Very basic beginner question (I hope)

Reply
Thread Tools

Very basic beginner question (I hope)

 
 
Chele Sedai
Guest
Posts: n/a
 
      03-14-2005
I am on my first day of learning ASP.NET (I hope that doesn't chase
anyone away from my post!) I am using "ASP.NET For Dummies" (Yes, I am
so slow that I need this book to start with). The first exercise is to
print "Hello and Welcome" on the screen in increasing font size.

Here is the code which I typed in exactly from the book:

<%@Page Language="VB" Debug="True" %>
<html>
<head>
<title>Hello and Welcome Page</title>
</head>
<body>
<center>
<% Dim TextSize As Integer %>
<% For TextSize = 1 to 7 %>
<font size = <%=TextSize%>>
Hello and Welcome!<br>
</font>
<% Next %>
</center>
</body>
</html>


Here is the result I get (centered on the screen):

> Hello and Welcome!



Can anyone tell me what the problem is?

 
Reply With Quote
 
 
 
 
Craig Deelsnyder
Guest
Posts: n/a
 
      03-14-2005
Chele Sedai wrote:
> I am on my first day of learning ASP.NET (I hope that doesn't chase
> anyone away from my post!) I am using "ASP.NET For Dummies" (Yes, I am
> so slow that I need this book to start with). The first exercise is to
> print "Hello and Welcome" on the screen in increasing font size.
>
> Here is the code which I typed in exactly from the book:
>
> <%@Page Language="VB" Debug="True" %>
> <html>
> <head>
> <title>Hello and Welcome Page</title>
> </head>
> <body>
> <center>
> <% Dim TextSize As Integer %>
> <% For TextSize = 1 to 7 %>
> <font size = <%=TextSize%>>
> Hello and Welcome!<br>
> </font>
> <% Next %>
> </center>
> </body>
> </html>
>
>
> Here is the result I get (centered on the screen):
>
>
>>Hello and Welcome!

>
>
>
> Can anyone tell me what the problem is?
>


I would assume you're not 'running' the page correctly. Meaning make
sure you have your virtual directory/web application folder setup
correctly, and that you named this file with an .aspx suffix. It looks
like it's not being run by ASP.NET at all....

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
 
Reply With Quote
 
 
 
 
Peter Rilling
Guest
Posts: n/a
 
      03-14-2005
What does the actual HTML look like?

"Chele Sedai" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> I am on my first day of learning ASP.NET (I hope that doesn't chase
> anyone away from my post!) I am using "ASP.NET For Dummies" (Yes, I am
> so slow that I need this book to start with). The first exercise is to
> print "Hello and Welcome" on the screen in increasing font size.
>
> Here is the code which I typed in exactly from the book:
>
> <%@Page Language="VB" Debug="True" %>
> <html>
> <head>
> <title>Hello and Welcome Page</title>
> </head>
> <body>
> <center>
> <% Dim TextSize As Integer %>
> <% For TextSize = 1 to 7 %>
> <font size = <%=TextSize%>>
> Hello and Welcome!<br>
> </font>
> <% Next %>
> </center>
> </body>
> </html>
>
>
> Here is the result I get (centered on the screen):
>
> > Hello and Welcome!

>
>
> Can anyone tell me what the problem is?
>



 
Reply With Quote
 
Karl Seguin
Guest
Posts: n/a
 
      03-14-2005
Chele:
Code works fine...if you view source are you seeing all that code? You do
have the .Net framework installed right? You might need to register IIS ala

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspne t_regiis -i

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"Chele Sedai" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> I am on my first day of learning ASP.NET (I hope that doesn't chase
> anyone away from my post!) I am using "ASP.NET For Dummies" (Yes, I am
> so slow that I need this book to start with). The first exercise is to
> print "Hello and Welcome" on the screen in increasing font size.
>
> Here is the code which I typed in exactly from the book:
>
> <%@Page Language="VB" Debug="True" %>
> <html>
> <head>
> <title>Hello and Welcome Page</title>
> </head>
> <body>
> <center>
> <% Dim TextSize As Integer %>
> <% For TextSize = 1 to 7 %>
> <font size = <%=TextSize%>>
> Hello and Welcome!<br>
> </font>
> <% Next %>
> </center>
> </body>
> </html>
>
>
> Here is the result I get (centered on the screen):
>
> > Hello and Welcome!

>
>
> Can anyone tell me what the problem is?
>



 
Reply With Quote
 
Trevor Benedict R
Guest
Posts: n/a
 
      03-14-2005
I took this code and placed it in a file called test.aspx and it worked
as expected. Is this the actual code that you had typed. Try pasting
this into another file and see how it works.

Regards,

Trevor Benedict R
MCSD

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Chele Sedai
Guest
Posts: n/a
 
      03-14-2005
I have installed the .Net Framework and I also installed IIS.

The file is sitting in the following directory (per the book's
instructions): inetpub\wwwroot\hello

(The actual path being inetpub\wwwroot\hello\welcome.aspx)

To run the file, I open up IE 6, SP 2 and type the following in the
Address bar: http://localhost/hello/welcome.aspx

Here is the HTML from View Source:

<%@Page Language="VB" Debug="True" %>
<html>
<head>
<title>Hello and Welcome Page</title>
</head>
<body>
<center>
<% Dim TextSize As Integer %>
<% For TextSize = 1 to 7 %>
<font size = <%=TextSize%>>
Hello and Welcome!<br>
</font>
<% Next %>
</center>
</body>
</html>

I will try to save the file as a different name and see if I get
different results.

 
Reply With Quote
 
Brock Allen
Guest
Posts: n/a
 
      03-14-2005
Your problem is that you're only viewing the file in the browser from the
filesystem and not via a webserver that hosts ASP.NET (like IIS). If you
look in the address bar of the browser does it say:

file://c:\pathtoyouapp.aspx

Or does it say:

http://UrlToYourApp.aspx

If it's the former then you need to configure your application in IIS or
some other webserver. If you don't have access to IIS, I'd suggest trying
WebMatrix[1]

-Brock
http://staff.develop.com/ballen

[1] http://www.asp.net/webmatrix/default...dex=4&tabId=46


> I am on my first day of learning ASP.NET (I hope that doesn't chase
> anyone away from my post!) I am using "ASP.NET For Dummies" (Yes, I am
> so slow that I need this book to start with). The first exercise is to
> print "Hello and Welcome" on the screen in increasing font size.
>
> Here is the code which I typed in exactly from the book:
>
> <%@Page Language="VB" Debug="True" %>
> <html>
> <head>
> <title>Hello and Welcome Page</title>
> </head>
> <body>
> <center>
> <% Dim TextSize As Integer %>
> <% For TextSize = 1 to 7 %>
> <font size = <%=TextSize%>>
> Hello and Welcome!<br>
> </font>
> <% Next %>
> </center>
> </body>
> </html>
> Here is the result I get (centered on the screen):
>
>> Hello and Welcome!
>>

> Can anyone tell me what the problem is?
>




 
Reply With Quote
 
Juan T. Llibre
Guest
Posts: n/a
 
      03-14-2005
Try this :

<% Dim I As Integer
For I = 0 to 7 %>
<font size="<%=I%>"> Hello and Welcome! </font>
<% Next %>

Notice the quotes after font size
and between the greater-than signs



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espaņol
Ven, y hablemos de ASP.NET...
======================

"Chele Sedai" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>I am on my first day of learning ASP.NET (I hope that doesn't chase
> anyone away from my post!) I am using "ASP.NET For Dummies" (Yes, I am
> so slow that I need this book to start with). The first exercise is to
> print "Hello and Welcome" on the screen in increasing font size.
>
> Here is the code which I typed in exactly from the book:
>
> <%@Page Language="VB" Debug="True" %>
> <html>
> <head>
> <title>Hello and Welcome Page</title>
> </head>
> <body>
> <center>
> <% Dim TextSize As Integer %>
> <% For TextSize = 1 to 7 %>
> <font size = <%=TextSize%>>
> Hello and Welcome!<br>
> </font>
> <% Next %>
> </center>
> </body>
> </html>
>
>
> Here is the result I get (centered on the screen):
>
>> Hello and Welcome!

>
>
> Can anyone tell me what the problem is?
>



 
Reply With Quote
 
Chele Sedai
Guest
Posts: n/a
 
      03-14-2005
Thank you!

Once I installed Web Matrix and started IIS from there, it ran just
fine!

I didn't realize that Web Matrix was a MUST HAVE, but I thought it was
optional. Thank you for pointing this out!

 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I found some very odd behaviour in Python's very basic types Sunjay Varma Python 4 03-10-2011 05:05 PM
A very **very** basic question mdh C Programming 57 09-26-2008 03:25 PM
very very basic question aghazalp Python 6 04-02-2006 09:35 PM
Very very very basic question Peter C Programming 14 02-14-2005 09:46 AM
very Very VERY dumb Question About The new Set( ) 's Raymond Arthur St. Marie II of III Python 4 07-27-2003 12:09 AM



Advertisments