I made a tutorial specially for who wants to learn ASP.NET to develop web applications using this platform.
ASP.NET it’s an evolution from ASP (Microsoft Active Server Page) using the development platform support Microsoft .NET.
One of the most important feature of ASP.NET it’s the reduced time for developing an application. Another important point is the simplicity and the facility to learn it. The programming in ASP.NET it’s the same and very varied (to develop a website you can choose from 3 programming languages: C#, Visual Basic and F# ).
Any page made in ASP.NET has 2 sides:
- Visual Side ( the one that the final user sees) it’s easy to make because of the many controls.
- The Programming side (the code that will be wrote on the server ).
In this tutorial I will try to show you how to create a new simple website using ASP.NET – C#.
Creating a new Website
First step in creating a new website is to open the application VISUAL STUDIO 2010. The second one is to select ”New Web Site” from File tab.
From the newer menu select the programming language (Visual Basic or Visual C#). We will select the location where do we want to create the website (it can also be a FTP address) and the type of the website. I will show you a website created in ASP.NET in C#. After pressing the OK button the website will be created.
Displaying The Interface
- In the upper left side, in Toolbox you will find all the controls that can be added into a website.
- In Server Explorer you can see the database attached to the website (in this moment it isn’t attached ).
- In center you can see the visual side of the website .
- In the right side you find the Solution Explorer where you can see all the files of the website and Properties where you find the properties of the selected object.
What I found very interesting about ASP.NET was the Site.Master (a page of the website). Using this you will build the other pages, adding just content letting the design intact.
To add a new page go to Website menu and select Add New Item. Will appear a new window from where you can select the type of the page and the name.
To view the website on localhost you have to select from the menu Debug and Start Debugging.
The database and the tables where will be saved users names and details about them will be created automatically.
The programming side
After you create a new page will be created a new file .cs where will be written the codes. If you have any questions don’t hesitate and ask in the Comment Section. Also if you want more ASP.NET tutorials right a comment with what would you like to learn about.