Moving from Classic ASP to ASP.NET

Soldato
Joined
12 Jan 2004
Posts
6,824
Location
Londinium
Hi guys,

I want to code my next project in ASP.NET rather than classic ASP so I get some experience in .NET. Ive looked at a few books and websites but havent found one that has a good tutorial into getting started with .NET. I alo want to use C# rather than VB as this seems to be becoming the standard. I have a background of Java so it shouldnt be a problem. My trouble is that all of the things I have read make it seem more complicated and difficult than it should be for someone of my experience. Has anyone here been in the same position as me? Do you know a good website that tells you the new way to develop apps in .NET compared to the old method in classic ASP?

Basically, I am confused as to what knowledge from classic ASP can be ported across to .NET - from what Ive seen they look incomparable.

Any help would greatly be appreciated.
 
Thanks guys, some really helpful replies there. As for the vb vs c# thing, I simply saw that many organisations were looking for c# skills so I thought I might as well get stuck in with this rather than carrying on with vb.

I just have a few other questions for y'all:

1.) Since the structure of asp and .net are quite different (top down vs event driven), are there any guides for best practices as to how to arrange your code? i.e. should it be script tags at the top that define all your page functions, and beneath that your html content? What about includes in .net, do they work in the same way as in classic? Any structural advice for the pages themselves as well as the app as a whole would be great.

2.) Are there major differences between asp.net 1.0 and 2.0? What is required to run each version, is it just a case of installing the right version of the .net framework?
 
therubble said:
The code of the page should be done in the code-behind page, each aspx page has the option of having another file behind it, its in this file that code should exist. This allows completely seperation of presentation and code.

Okay cool. Is there any way of compiling it without visual web developer installed? Also, are includes no longer used? Are they replaced by using other compiled classes?

There are major differences between the new release, and tbh there is no reason of going for anything under version 2, a major one that may interest you is the Version 2 is XHTML out of the box where as prior versions arent. There are plenty of hosts out there that can support you, I personally use hosting in the states as in my humble opinion you get better bang for the buck, just don't go with a budget host.

I will be using it at work but I dont think they have upgraded to version 2 yet, so its 1.4.11.
 
I have another question guys!

I like to use a reasonable amount of JavaScript in my apps (I know, I know!) and I was wondering how Javascript fits into ASP.Net. i.e. can you happily fit ajax type code around asp.net to minimise server calls? From what Ive seen of .nets event driven programming it mostly results in another call to the server increasing traffic (e.g. if a button is clicked). Using Javascript you can handle all gui events locally until you are ready to submit the data to the server, decreasing the total load on the server. Is this approach compatible with asp.net?
 
Thanks Mr Rubble!

Yet one more question for you if I may!

If I wanted to dynamically generate form fields (server controls) on the client side via javascript (say, when the user clicks a button, add a new row of input fields), to be submitted by the user and their values used in c# code on the server, how would I go about this?

As far as I can tell, you cant use asp.net tags (<asp:TextBox...) obviously as the client wouldnt be able to interpret them, so you have to use standard html tags (<input type="text"...). But then how would your c# code access these fields?

Essentially, Im trying to figure out the balance between using server controls and using standard html, and the pros and cons of each in asp.net.
 
Back
Top Bottom