This tutorial is for beginners who are just starting out, that are looking for a simple introductory website to build in order to become more familiar with the Microsoft visual studio 2010 interface.
Yes, it is possible to find a good web host.
Sometimes it takes a while. After trying several,
we went with Server Intellect
and have been very happy. They are the most professional,
customer service friendly and technically knowledgeable host we've found so far.
What you will need for this tutorial
- Microsoft Visual Studio 2010 or Microsoft Visual Web Developer 2010 Express
- A computer with an internet connection and Microsoft Windows 7 operating system
- A basic understanding of the web and some programing experience would be helpful
Topics that will be covered
- Starting an empty web site in Visual studio in C#
- Creating basic web pages using the web form method
This tutorial will walk you through building a simple website with a navigation structure
demonstrating the functionality of the common tools in Visual Studio 2010. You will also create
a basic navigation system for your web site. First let’s get started with a new website by opening
and running Visual Web Developer 2010 Express.
Starting a New Website
- Open Visual Web Developer 2010 and in the file menu select the new website option from the dropdown menu or on the start page.
- When the new website dialogue box appears, select installed templates and then select visual C# from the dropdown
list to set the programing language.
Visual studio comes with two pre-installed “code-behind” programming languages C# and Visual Basic.
This tutorial only covers the C# language.
- Select Empty ASP.NET Website from the list in the center. This will start your project without the default webpage.
When starting a new website, visual studio gives you the option of either creating a blank website or
opening a pre-structured website that has a default style and master page already applied to it.
- In the Web location box, select the browse option and navigate to the folder location where you want
to save the files to your project. For now, leave the name of the website as its default name (Example: Website1).
You can rename your file by deleting the default (…/website1) at the end of the file source and replacing it
with a filename of your choice before saving.
- Click OK and Visual Web developer will generate the project.
We chose Server Intellect
for its dedicated servers,
for our web hosting. They have managed to handle virtually everything for us,
from start to finish. And their customer service is stellar.
Creating a Basic Web Page
- In the solution explorer, right click the name of the website (Example:C:\…\...website1)
and select Add New Item from the list.
- When the Add New Item display opens, select Web Form from the installed templates list.
Take look at the installed templates list. These are all of the pre- installed
templates that can be used to create dynamic web applications.
- In the name box type Home.aspx and make sure the place code in separate file box is checked,
and the select master page box is unchecked.
Checking the “place code in separate file” box will tell visual studio to create the web page with
a “code behind” page, which is a separate page that is attached to the web form when you create an event handler.
Basically this is where the C# or Visual basic languages will come into play.
Leaving the box unchecked will tell visual studio to create an inline code on the same page.
The difference between the two is really a matter of preference but for the purposes of showing the difference
between the pages; we will create a code-behind page.
- Click Add.
Congratulations, you just made your first webpage in visual studio!
You will notice that the page opens automatically in source view and there is already some code on the page.
This is the pre-formatted HTML structure for the Web Page.
We are using Server Intellect
and have found that by far, they are the most friendly,
responsive, and knowledgeable support team we've ever dealt with!