Hope I don’t get marked down for a dumb simple question…
I have written a couple of Windows Forms application before (very very basic!) and now my manager wants me to write an web front end application where I put a server into a text box and press enter and then it displays some settings about the server.
When I go into Visual Studio New Project which project should I choose to do this? This will be in C# and the options are below:
- Windows Forms Application
- WPF Application
- Console Application
- Class Library
- WPF Browser Application
- Empty Project
- Windows Service
- WPF Custom Control Library
- WPF User Control Library
- Windows Forms Control Library
What my aim is to write the code on the backend and then link a ASP.net webpage to the code so it reads information about settings on the server and displays all the stuff on the webpage.
Is ASP.net the best way to do this or something like WPF? Never done both so want to go for something that I can use again and again (and is simple to learn and implement!)
Thanks
You want to click the Web tab under C# in the project template browser and choose the template for an ASP.NET Web Application, or if you feel confident enough, you could even go for the MVC approach. This will largely depend on your skill level! You will need Visual Web Developer (2010 and prior), Visual Studio for Web (2012), or a version of Visual Studio that is NOT an Express Edition, and has web templates installed.
Just FYI…as for your list of project templates, this is why they are NOT suitable for web applications.
Windows Forms Application
Desktop application based on Windows Forms technology (WPF is the successor to WinForms)
WPF Application
Desktop application based on Windows Presentation Foundation technology
Console Application
MS-DOS style text based “console” application.
Class Library
Purely code which compiles to DLL and therefore cannot be directly executed.
WPF Browser Application
Similar to a “WPF Application” except that it is meant to run inside a browser.
Empty Project
Does what it says on the tin!
Windows Service
An application which runs in the background, limited/no user interaction.
WPF Custom Control Library
Allows custom WPF controls to be created, for use with a WPF application.
WPF User Control Library
Allows custom WPF user controls to be created, for use with a WPF application.
Windows Forms Control Library
Allows custom WinForms controls to be created, for use with a WinForms application.