Create a Web Site using Visual Studio 2010

Create a Web Site using Visual Studio 2010

Here’s a quick view on how to set up a web site using Visual Studio 2010 for your ASP.NET projects. I’m going to take you through three main steps. First, I show you how to make a folder to hold your websites, Then we will create a new web site. We will use the plain or empty web site and then add a new page. Let’s start by going into Windows Explorer. [mouses down to the lower left corner] I set up a folder on the desktop called “visualStudioWebSite” This will hold all my web sites. Then, I’m going to load up Visual Studio 2010. Inside of Visual Studio I’ll use File/New/Web Site. You can create a Project. A Project is design to hold several websites. But, keep things simple and just use “Web Site”. I recommend using the ASP.NET Empty Web Site. I just want to point out a few things that will remain once you initially set them. In this class you want to use Visual Basic as the language. Another popular language is Visual C Sharp. That is very Java-like. But, we are going to be using Visual Basic in this course so you want this set to Visual Basic. The .NET framework is set up for version 4.0. But, you can also go back to an earlier version if you need to for compatibility. The interesting piece is, that all of these frameworks are the same. They are all version 2.0, except for the added features built on top of version 2.0. 2.0 is the simplest. Through the years, as Microsoft came out with new versions, they added more capabilities on top of version 2.0. around the core. You should probably if you are using 2010 you’ll come up with Framework 4.0. The other pieces down here…. you can set up your file type You can see that you can use HTTP or FTP. We are just going to use the File System. We are going to browse out the that folder that I made on the desktop. We are going to browse out the that folder that I made on the desktop. Find my desktop. Here’s my desktop Here’s my visualStudioWebSite. Again, I’m going to check: Visual Basic, Net Framework 4.0, ASP.NET Empty Web Site, and then pointing to the correct folder where I want to store my new website. Click on OK Visual Studio is going to ask where you want to store the web site. Well, I’m going to put it in this folder (visualStudioWebSite) And, I’m going to call it I’m going to put an “sol” in front of the filename typing I’m going to give it a name so I can recognize it in the future. The “sol” stands for “solution”. solHelloWorldDemo.sln – As soon as I see this folder I’ll know it is a Visual Basic solution folder. A Visual Studio solution. Notice again, I’m inside the visualStudioWebSite. This is where I’m going to store all my web sites. And this solution is going to create another folder. inside this visualStudioWebSite folder. (Note: this didn’t really work out as I thought it would…) Here’s my website. I’m going to go into the web site by right-mouse clicking on the site name in the Solution Explorer. Right-mouse click and select “Add New Item” The “Add New Item” window comes up and we want to add a “Web Form”. Right on the top. Now, Microsoft really likes to use the file name default.aspx. My preference is to do what most other web people do, using index.aspx instead. [typing to change the name default.aspx to index.aspx] .aspx is the extension for .NET They couldn’t use .asp because that is the old version and they completely redid the language for .NET. So, they renamed the extension .aspx so there wouldn’t be confusion between the two programming languages. We also want to put our code in a separate file so make sure that box (in the lower right corner) is checked. Right now, we aren’t going to use Master Pages, although you will learn how in future modules. Back to Web Form and say Click on the Add button. and you can see here is our new web page (in the Solution Explorer panel on the right side of the screen.) The web page comes up as pure code. There’s some added features in here that aspx uses. Here’s the DOCTYPE setting up the page as transitional. You can see it is a standard HTML web form.

Danny Hutson

7 thoughts on “Create a Web Site using Visual Studio 2010

  1. @MrOlohitah – I turned out I covered the essentials in this first video and didn't need a second one. I've updated the title and removed the "Part I" Thanks for pointing this out.

  2. thanks sharing knowledge, I would like to ask a simple question: With all the confusing information around(people are doing html embedding in java scripts…others do php..etc), this is a little too confusing for a beginner, I believe that is possible to build up a whole web site 100% out of asp .net and only asp .net without using js or php, is that true?
    I wanna with asp .net, it is good enough especially for itsblow learning curve when starting form vb .net thanks guys

  3. This video was created to help people using Visual Studio 2010 or 2012. Your Web Application will be a little different. There's lots of information out on the Web to help you. Lots of videos and helpful info. Good Luck!

  4. In Visual Studio go into the Publish menu item and select "Publish to Web Site" You'll need a hosting web server with a domain name in order to do this. I'll put a link in the video description with more details.

  5. A project is a collection of web sites. So, go ahead and use "New Project" and just have the one Web Application/site in it. It is a little more overhead, but in the learning mode that really doesn't matter.

    Every version changes these details a bit and we all just have to adjust and poke around to find how our own version works.

Leave a Reply

Your email address will not be published. Required fields are marked *