473,486 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Very basic beginner question (I hope)

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?

Nov 19 '05 #1
8 1072
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
Nov 19 '05 #2
What does the actual HTML look like?

"Chele Sedai" <ch********@gmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr 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?

Nov 19 '05 #3
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" <ch********@gmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr 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?

Nov 19 '05 #4
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!
Nov 19 '05 #5
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.

Nov 19 '05 #6
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?


Nov 19 '05 #7
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" <ch********@gmail.com> wrote in message
news:11**********************@l41g2000cwc.googlegr 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?

Nov 19 '05 #8
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!

Nov 19 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1471
by: hellrazor | last post by:
Hi there, First of all, I'm very much a C++ amateur (i.e., a newb). I'm having to program a win32 system service for my employer, and I'm almost done with the task, but I need help with...
5
5701
by: Lee David | last post by:
I went to the sun site and downloaded what I hope is the development part of java. I downloaded JDK5 with Netbeans. I installed it and now have a folder in my program group "Netbeans". Is that...
0
1531
by: Andy | last post by:
Hey All, I'm a beginner with VB.Dotnet Deployment and I'm a little confused about some very basic deployment issues . . . I've now created some core assemblies that will be used throughout all...
7
3171
by: jim Bob | last post by:
Hi, This is probably very simple to do so if anyone can point me to the right place for reading, it would be much appreciated. I just want to build a very basic search form where i can enter a...
17
2379
by: blueapricot416 | last post by:
This is a very basic question -- but I can't find the answer after looking for 20 minutes. If you code something like: function set_It() { setTimeout('Request_Complete("apple", -72)',5000) }...
2
1140
by: Vincent Courcelle | last post by:
Hello, My question is very basic but I can't find an answer on search engines for it. How can I "pass" a variable to a control in a non programmatic way (directly in the .aspx file, not through...
4
1599
by: Stimp | last post by:
Hi all, I'm trying to read a particular node value from an XML file, but I've done some searching on the net and there doesn't seem to be a very basic example. Basically here's what I want to...
3
1244
by: bbatson | last post by:
New to visual basic; trying to teach myself. Here is very basic code I am using to try to fill a text box on my form after updating a box that selects an employee ID. Dim strsql As String strsql...
1
204
by: Rik Wasmus | last post by:
On Tue, 17 Jun 2008 00:52:16 +0200, Twayne <nobody@devnull.spamcop.net> wrote: Euhm, no you can't. The only thing remotely close is something like: echo 'foo','bar'; .... which is nothing...
0
7123
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7173
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7305
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4863
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3066
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.