I have just started learning C#.
Can anyone explain the technical differences between a .Net desktop application and a web application?.
I mean for example, if I have a simple HelloWorld application using a WinForm, what are the steps required to change that into a HelloWorld web application?
There’s no real way to make a “fair comparison” as the two really are like “chalk and cheese”. A desktop application has one “entry point”, running the executable whereas a web application has many, each .aspx page that you’ve created.
There’s no “easy” way to convert a “Hello World” application as the UI/presentation models are so completley different. A classic console application is entirely written in code using
Console.WriteLine, whereas a webforms application that says “Hello World” can be written entirely in asp.net markup.An asp.net “Hello World” application can be as simple as a file called default.aspx containing:
Whereas the console/desktop application equivalent is: