New to ASP..<%@ Page Language="" %>
I have recently decided to dive in to ASP and have set up 开发者_开发知识库a Windows Server package on my resellers account (shared hosting).
I'm from a largely PHP background and haven't touched ASP since, well, tonight.
I created a new file in Dreamweaver (hey, I like the colourful syntax) and was presented with a choice of filetypes:
- ASP Javascript (file.asp)
- ASP VBScript (file.asp)
- ASP C# (file.aspx)
- ASP VB (file.aspx)
Could someone better informed please tell me why some files are .asp
and others are .aspx
?
I'm aware that the ASP framework supports JS/C#/VB (I think!) but what does this mean in laymen's...that a developer may use a language of their choice within ASP pages?
Also, Dreamweaver added:
<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="utf-8" %>
<!DOCTYPE html>
to the top of my page, which, when I uploaded caused a Runtime error. (My hosting was unable to show any errors except for the generic one).
Removing this top line, and my code seems to work:
<!DOCTYPE html>
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<%Response.Write("My first ASP script!")%>
</body>
</html>
Any clarification would be great.
Thanks in advance.
asp
is the "old" Active Service Page and aspx
is ASP.NET. I recommend you dive into the tutorials over at ASP.NET, the videos are really great and easy to understand.
I would also recommend going for ASP.NET MVC which is a bit easier to understand if you are use php development.
We are stuck with an old ASP classic application at work. PLEASE start with ASP.NET. You will never regret it. ASP is an old technology with a lot less possibilities than ASP.NET.
If your writing ASP and Not ASP.NET then you want ASP VBScript or ASP Javascript. ASP.net is a totally different beast. It would be like comparing PHP to Java. Hope that helps.
*.aspx
is Asp.NET, which has been Microsoft's flagship for the last 10 years. *.asp
is the "old" ASP, now called "Classic ASP", which was in use before Asp.NET was introduced.
精彩评论