Published:
03 Dec 2003
|
Abstract
Although you can't just rename your .ASP's to .ASPX's and expect them to work, for anyone familiar with VBScript and Classic ASP it should not be too difficult to get to grips with the new ASP.NET/Visual Basic.NET combo. |
 |
by Chris Garrett
Feedback
|
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days):
20618/
76
|
|
|
|
| Moving to ASP.NET |
Moving to ASP.NET by Chris Garrett
Although you can't just rename your .ASP's to .ASPX's and expect them to work, for anyone familiar with VBScript and Classic ASP it should not be too difficult to get to grips with the new ASP.NET/Visual Basic.NET combo.
With few exceptions, ASP.NET is compatible with traditional ASP.
Getting started
- Once you have downloaded and setup the .NET Framework [http://www.asp.net/b2download.aspx], start a new document called something like "test.aspx".
- Enter into the document <% response.write("Hello world") %>
- Save the document and launch in your browser
Congratulations, your first .ASPX :O)
So why can't I just rename my .ASP's??
- ASP.NET pages support only a single language.
- ASP.NET page functions must be declared in script blocks.
- Page-render functions are not supported
Set and Let assignments are no longer supported in Visual Basic.NET.
- Non-indexed default properties are not supported in Visual Basic.NET.
- Parentheses are required for calling subroutines in Visual Basic.NET.
A lot of ASP programmers use either VBScript OR JScript, so this will not be too much of a pain. When I have used multiple languages it has been when either updating someone elses script or in pre-regular expression days I would use perlscript. No worries there.
Most scripts will need editing to take into account functions defined in <% %>blocks and subroutines requiring parentheses, but that is a copy&paste job. Not being able to put HTML inside functions without using response .write directly is a real pain, but I expect it was not good practice in any case.
Creating objects without the "set" is no big hassle, but I expect I have a lot of code to sort through to find where I have called rs("fieldname") and will have to change to reference ".value" instead.
So, no worries then, eh?
Remember though, classic ASP is not going to dissapear overnight and both can coexist on the same server, just look at ASPAlliance.com!
|
|
|
|
|
Article Feedback
User Comments
Title:
That's it?
Name:
YB
Date:
11/24/2008 2:21:54 PM
Comment:
i have tons and tons of questions on ASP vs ASP.NET and i CANNOT find any answers. all "quick start" .NET sites give you an overview but not how to change the business logic, etc. it's very frustrating or am i just stupid?
|
Title:
Shiko
Name:
Dirar
Date:
7/30/2007 4:45:18 AM
Comment:
I am having a problem changing the logic I was working on for some years in ASP. Now I have to move to .net and I hate it.
|
Title:
Come on!
Name:
Jeffrey Jangli
Date:
1/15/2007 5:01:02 PM
Comment:
Come on! You guys probably got here by "googling". Need more info? Just go google again!
|
Title:
Less Infornation
Name:
Anup
Date:
10/3/2006 6:09:18 AM
Comment:
please provide some examples
|
Title:
NOT ENOUGH CONTENT
Name:
S.RAGHURAM
Date:
3/19/2006 9:14:26 AM
Comment:
HI.THIS CONTENT IS NOT THAT MUCH ENOUGH BUT THE FULL REPORT HAS NOT BEEN PRESENTED
|
Title:
Good
Name:
Kaps
Date:
7/9/2005 5:57:36 AM
Comment:
Site is good but it will be more good if there will be related examples
|
Title:
Good But
Name:
Thada
Date:
4/2/2005 1:52:47 AM
Comment:
Your site is very good but I want to know clearly about comparison of ASP and ASP.net. So, explain about it pls. Thank u for your kindness.
|
|
Product Spotlight
|
|
|