all groups > dotnet academic > december 2003 >
You're in the

dotnet academic

group:

Help with ASP.NET


Help with ASP.NET Shawn Marshall
12/20/2003 4:27:21 PM
dotnet academic: Hey, I'm a beginner with the ASP.NET language. I'm reading an ASP.NET book
that has an example, but when i copied the code from the book it didn't
work.

Here's the sample code:

<%@ 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>

It's suppose to show "Hello and Welcome" 7 times in accordance with the font
size. I ran the code through Macromedia and in Webmatrix and all the page
displays is one line saying "Hello and Welcome".

Can somebody tell me if the code is wrong or is it something I am doing?

Thanks
Shawn

Re: Help with ASP.NET Michael
12/20/2003 11:45:28 PM
Not sure, but I think that in order to run this in Web Matrix, you have to
use the code-behind method. That means that your VB code needs to be
separate from the html code and not all mixed together like you have it.
The book thta you are using is probably for using ASP.NET within Visual
Studio, but if you are using Web Matrix, the code may need to be modified. I
would recommend that you get one of the books specifically for using Web
Matrix.


[quoted text, click to view]

AddThis Social Bookmark Button