Very easy: difference between aspx and asp

J

Joshua Weir

Hi there,

I am quite new in terms of server side programming. I understand how asp
scripting works and how you put <% %> around your server script. However this
is .asp .......what is .aspx? is this the new version ASP.nET?

I dont understand how it works when i create a new aspx project in
vstudio.net and i create a aspx page in design view. I add a button and then
double click it to add code to that button. I dont see any html code around
it?? In an asp page the server side code is surrounded by html code!

An aspx page almost looks like a normal vb application, why is there no html
code around?

Thanks,

Joshua Weir
 
R

Ray Costanzo [MVP]

Although file extensions are arbitrary, for the sake of this discussion,
yes, asp = ASP.old, and aspx = ASP.NET.

Visual Studio uses "code behind" files when creating ASP.NET pages.
Interlaced code still exists in ASP.NET though, or code in the same file.
The code doesn't have to be in a separate file. Perhaps start here:
http://support.microsoft.com/?kbid=303247 or
http://www.4guysfromrolla.com/webtech/100500-1.shtml#postadlink

Also, so you know for any future, the microsoft.public.inetserver.asp.*
groups are the ASP.old groups, whereas the ASP.NET groups have "aspnet" in
their names.

Ray at work
 
J

Joshua Weir

Thanks Ray this makes sense,

Another question, say i have a simple vb.net form application that i want to
implement with ASP.net. Does this mean i can pretty much implement all the
functionality in the same way (assuming that ASP.net uses VB.net and not
VBScript)

ie. i create all the forms, then add vb.net code to each as i would in the
form application.

Or does it use a hybrid form of vb.net?
 
R

Ray Costanzo [MVP]

Did you read the part about how this is an ASP.old group. ;]

Ray at home
 
R

Ray Costanzo [MVP]

Reply #2

Part of the problem with ASP.NET, which is amplified by the usage of Visual
Studio.NET, in my opinion, is that these things are desinged such that
they're almost trying to "trick" the developer into either forgetting or
never realizing that ASP.NET is still a Web-based technology that is not
client-event-aware. Using ASP.NET, one can add an "onclick" event to a
button that the server handles, but what's really happening is that ASP.NET
is "automagically" generating the necessary HTML to make that click event
post back data to the server where it automagically will "wire up" that
event to the onclick code.

In theory, ASP.NET functionality could be duplicated with a well organized
library of include files. But, I personally will leave such tasks up to
Microsoft...

And the usage of .NET languages in ASP.NET is a benefit that cannot be
overlooked, so don't get me wrong. I'm completely in favor of ASP.NET.

So, no, you can't just take a VB.NET form and have it be an ASP.NET form.
An ASP.NET form is still just an HTML form, although VS.NET will try to
trick you into forgetting that. :]

Ray at home
 
R

Ron

Hey Joshua,

when you are in design view, instead of going to the code behind module, you
can click on the HTML tab at the bottom of the page in design view. this
will take you to the HTML that you miss from classic ASP. in ASP.NET you
have a Design view, and HTML view AND a code behind module (that you do not
need to use).

also, the fundamental difference between web development and "regular"
windows form development with .NET is that windows forms programs use the
System.Windows.Forms namespace and web forms use the System.Web.UI namespace.

So even though it can "feel" the same when you are programming, it is not
the same. lyou have to get familiar with the classes, objects methods etc
etc of each namespace to become fluent.

you might want to try some of the walkthroughs that come with the visual
studio msdn help. it should help you get started.

Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top