Difference between using asp.net and C#

  • Thread starter Thread starter Tony Johansson
  • Start date Start date
T

Tony Johansson

Hello!

I have been using windows forms for about 1.5 year.

I wonder if there is a big difference to begin using asp.net(C#) to create
web applications
compare to using windows forms.

//Tony
 
There is no difference as written in your subject, C# stays C#.

However, there is a big difference between creating webpages and windowforms
(in the classic way).

The main thing to take care of is not to create static classes which hold
changeble data.

A webpage has no state and therefore all data disapears after the send which
is not in a cache, session or viewstate.

Cor
 
Tony Johansson said:
Hello!

I have been using windows forms for about 1.5 year.

I wonder if there is a big difference to begin using asp.net(C#) to create
web applications
compare to using windows forms.

No, not really are the controls for ASP.NET Web form and Windows form that
different. The one thing you have to recognize is that a Web application is
a stateless session, unlike a Windows desktop solution that always keeps
state.

Each time a control like a button is pushed, a round trip is made between
the client's Web browser and the Web server, meaning every thing about the
Web page like controls, variables etc are lost and have to be rebuilt or
data in variables must be held on to on the round trip.

The key is to know at what state a Web page is in at any given point.

http://www.15seconds.com/issue/020102.htm
 
Tony Johansson pretended :
Hello!

I have been using windows forms for about 1.5 year.

I wonder if there is a big difference to begin using asp.net(C#) to create
web applications
compare to using windows forms.

//Tony

Main differences between winform and web-application:

winform:
* each user has his own instance of the application
* direct interaction between code and screen

webform
* one application serves multiple users simultaneously, so don't store
user-specific information in statics (singletons) - use Session or
ViewState instead.
* request/response model: the client issues a request, you process it
in code and generate a single html (usually) response. After that the
Page instance is destroyed.

Hans Kesting
 
Hello!

I have been using windows forms for about 1.5 year.

I wonder if there is a big difference to begin using asp.net(C#) to create
web applications
compare to using windows forms.

The difference _may_ seem small at the first glance, but it is
actually very significant. Read the "ASP.NET Page Life Cycle Overview"
article on MSDN:

http://msdn.microsoft.com/en-us/library/ms178472.aspx

You'll see the fundamental differences in two models straight away.
 
Back
Top