Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP.net page doesn't work 3

Status
Not open for further replies.

Maisie2007

Technical User
Apr 12, 2007
42
CA
Hi,

I'm doing my first page in ASP.net but it won't execute as it's supposed to.
I installed IIS, and html works fine when I ask for the page, but not my aspx page (it shows up as just html).

Here's the code I used:

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

What might be wrong?
thanks,
Maisie
 
Did you install IIS after the .net framework was installed?

You may need to register .net with IIS

To do so, you need to run
Code:
aspnet_regiis.exe -i
on the command line. This exe lives in the:
c:\winnt\Microsoft.NET\Framework\[YOUR DOT_NET VERSION]\ directory. Run that and see if that helps. Most likely, IIS does not know how to handle a .aspx file
 
Also, you are coding in classic ASP style. ASP.Net uses code behind pages.
 

I didn't know .net framework needed to be installed.
How do I do this? Is it complicated?
Maybe I should just test my pages on a free server?

Thanks,
Maisie
 
No, it's not hard to install the framework and it can be downloaded from here. I'd also suggest downloading Visual Web Developer which is a free tool you can use to develop your ASP.NET applications and it comes with it's own built in web server for testing. You should also take not of jbenson001's suggestion of placing all your code in the code-behind file as ASP.NET is trying to get away from the classic ASP style that you've used in your example.


____________________________________________________________
Mark,
[URL unfurl="true"]http://aspnetlibrary.com[/url]

Need help finding an answer? Try the Search Facility or read FAQ222-2244.
 

If I use Visual Web Developer,would I still have to install the framework?

I didn't know I used Classic ASP in the example I put there....I took it from a book called ASP.NET for Dummies, so I was assuming it was ASP.NET - "VB" should stand for Visual Basic.NET, am I not correct?
 
If I use Visual Web Developer,would I still have to install the framework?
No. As Mark stated, the web server is built in.
I didn't know I used Classic ASP in the example I put there....I took it from a book called ASP.NET for Dummies, so I was assuming it was ASP.NET
If that is an example from that book, I'd get rid of it right away. There are several good intro books out there, forget the DUMMY one. That code uses inline script, as Mark has stated, .NET is moving away from. Use the code behind files.
it was ASP.NET - "VB" should stand for Visual Basic.NET, am I not correct?
Yes, VB stands for Visual Basic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top