Difference between VB.NET and ASP.NET

osl

Member
Joined
Jun 8, 2006
Messages
20
Programming Experience
5-10
Hi,
I got confused between VB.NET and ASP.NET. Correct me, if I'm wrong OK?
VB.NET is for Windows Application where the form are with .vb extension and ASP.NET is for Web Application and the forms are with .aspx extension right?

Currently, I'm developing Web Application and am stuck with the Shell function. When I search under msdn help, I followed the sample and below is my codes. Nothing took place with my batch file when I execute with a command button. Tested it outside the web application and it works fine.

Pls help.
Thanks!

Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Shell("C:\Inetpub\wwwroot\WebApplTest1\load.bat", AppWinStyle.MaximizedFocus, True, -1)
End Sub
 
Hi,
I got confused between VB.NET and ASP.NET. Correct me, if I'm wrong OK?
VB.NET is for Windows Application where the form are with .vb extension and ASP.NET is for Web Application and the forms are with .aspx extension right?

This is not correct. From wikipedia:
"ASP.NET is a set of web application development technologies marketed by Microsoft. Programmers can use it to build dynamic web sites, web applications and XML web services. It is part of Microsoft's .NET platform and is the successor to Microsoft's Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime, meaning programmers can write ASP.NET code using any Microsoft .NET language."

"Visual Basic .NET (VB.NET) is an object-oriented computer language that can be viewed as an evolution of Microsoft's Visual Basic (VB) implemented on the Microsoft .NET framework."

As stated above, ASP.NET can be written using any .NET language. You can write ASP.NET pages using VB.NET as you have done yourself according to your post.

To understand ASP.NET is difficult at first (for me anyway). You have to understand what happens when requesting an ASP.NET page, and here it is in a nutshell: A user navigates to a website URL using a browser which sends a request to a web server. The webserver sees that the request is for an ASP.NET page by looking at the extension (.aspx). If it is an ASP.NET page, it asks the ASP.NET compiler to create an HTML page from the code contained in the .aspx file. So you see, a web server always serves static HTML pages (not exactly correct but suites this explaination). For example, if the ASP.NET page contains a datagrid, the ASP.NET compiler will examine it's properties and possible query a database then create a HTML table to present the data to the user.

So you see, ASP.NET is compiled on the server as opposed to client side. The commands you run are run on the server and not the client computer. If you run a shell command, the command is executed on the server and the end user won't see the results. (should look into the Process class as a more powerful alternative to shell function)

If you want more help, let us know what you are trying to do.

Hope that helps.
 
Back
Top