Click to See Complete Forum and Search --> : Help understanding ASP and ASP.NET


depthcharge623
12-17-2010, 09:46 AM
Hello,

I am brand new in the area of web developing. I have some background programming, so I understand the languages, etc but am having trouble understanding the basic concepts behind web developing.

My company has an intranet page which allows operators to enter information in during their shifts, and stores this information in SQL databases. This data can later be viewed through other pages at a later time. The existing pages use ASP (or ASP.NET) on the server side and HTML on the client side. I have been tasked with adding more pages to enter data and edit some of the existing pages. I have been using an old book called Teach Yourself Active Web Database Programming in 21 Days, but it is from 1997 and most likely outdated. I have had trouble getting a lot of the examples to work, and even if they did, I would rather learn from a more recent book. I found this book online and am thinking about buying it:

http://www.amazon.com/Beginning-ASP-NET-3-5-VB-Programmer/dp/047018759X/ref=sr_1_4?ie=UTF8&qid=1292341088&sr=8-4

The problem is, I'm still not really sure what the difference between ASP and ASP.NET are. I am currently learning using my work desktop running Windows XP Professional, and have installed the IIS from windows components. In add/remove program files it shows Microsoft .NET 1.0 - 4.0 frameworks installed. Does that mean I have ASP.NET?

Does that book look like a good learning tool for what I want to do, or is there another one you would recommend? Sorry if I am confusing at all, I am struggling to understand these concepts.

compbrat75
12-23-2010, 02:51 PM
Hello depthcharge623,

I'm just delving into the depths of ASP and ASP.net myself; however, I've been web programming in other languages for 10 years now (mainly perl, php and unix shell scripts with javascript).

There are some excellent tutorials on the web so you don't need to buy a book unless that is your preferred mode of learning. (I have many books.)

So far, I can tell you what I have learned in the last two weeks.

ASP:
ASP is often referred to as "Classic ASP" and uses either JavaScript or more commonly VBScript to write pages.

You can test these pages on your PC (I'm running 32-bit Win 7).
You need to make sure of the following though:
In your IIS, you need to have a default website (localhost) set up.
In control panel, you need to go into the install/change windows components and make sure that all of the ASP, ASP.net, and IIS components are enabled.
Your .asp pages will need to live in C:\inetpub\wwwroot (if you don't have this folder, then double check those windows components and the IIS settings).
You can also map some other folder through IIS, but this is the default.

ASP.net:
This is more advanced and can use Visual Basic as the programming language among others (like C#).
This one is much more robust and has more options available for file access

A couple of quick tips:
Define a variable:
ASP:
Dim myvar
ASP.net (VB)
Dim myvar As String

(dim is define in module)
Both:
Response.Write("<p>Hello, World</p>")
Response.Write("<p>Hello," & myvar & " World</p>")

I'll tell you that I'm trying to write an asp/aspx page that streams an image and I'm running into all sorts of problems, mainly permission issues between servers. I started out in Classic ASP with VBScript as the language and I've switched to ASP.NET with VB as the language.

Edit:
Oops, I almost forgot one of the big differences: ASP pages end with .asp and ASP.NET end with .aspx
If you want to use some ASP objects in ASP.NET pages, then you need to add the following to the declaration at the top of the page:
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="utf-8" aspcompat=true%>


I hope that helps a bit. :D

~Maria