Question
Each semester we have a different problem to solve. You are hired to create pages for a Bookstore. They would like to have a few
Each semester we have a different problem to solve. You are hired to create pages for a Bookstore. They would like to have a few web pages created today. to see how the site would look. We will work on this web site all term. You build this web site each week by adding pages each week. Problem 1: Using Visual Studio to Create your Web Project/Solution Create a folder on your Desktop using your last name. In this project I'll use Jones. Open Visual Studio. Go to the File menu and select New then Project. In other courses you may have worked with just web sites or folders. In this class, you will select Project. We want to work with the project and solution files in this course. Your options may look different depending on the version of the software you have installed. We will start off using a template and then write our own code. Notice that there are many templates available including iPhone templates. Select Visual C# and then Web. There is one option, ASP.NET Web Application which you should select. Click the Browse button to locate and select your folder. In the name textbox enter your last name again. At the top of the window, is the version of the .NET Framework you are using. Pick the highest number (i.e. 4.6.1) Click OK. To configure the project you have to choose which templates you want to work with. Select Web Forms. By default authentication is set to Individual Accounts. Leave that selected. By default Host in the cloud is checked. Uncheck that checkbox. Click OK. The startup page opens. This is a useful page that links you to many resources and tutorials. Getting to know Visual Studio Again Just like in CS321, Visual Studio and ASP use the same windows, such as the Solution Explorer, Properties, and Toolbox. Look in the Solution Explorer Window. Three default pages are created for you (Default, Contact, About). Expand the Scripts folder. Notice the third party JavaScript files including JQuery and Bootstrap. Expand the Content folder. Notice the Bootstrap.css file and Site.css file. The Site.css file is what you will edit in this class. Right click on the Default.aspx file and select View in Browser. As your readings told you, you must view web pages using a web server. You can see in the URL that you are viewing the web page in a local web server, called localhost. The numbers after the colon are the port numbers for your web site. Normally the port number is the default 80, and does not need to be included. However, because the local web server with Visual Studio uses port numbers you must use it to locate your files. Notice the shell of your application appears with a menu and login all setup. You will learn what each of these pieces mean during this course and how to customize this web application. Click on Register. In the form enter the data: Email student@park.edu and the password GoldFish4$Sale. Notice the page recognizes you as a valid user and the register button is removed and a Logoff button is viewable in the menu. This is your LoginStatus control that can detect your status and change content depending on your login status. Click on About and Contact in the menu. Notice the layout is the same on each page. A master page is used to keep all pages the same. Keep the browser window open. Use the taskbar in Windows to return to Visual Studio. Open the Site.master page, which is the master page template. Just double click on the file in Solution Explorer and it will open, just like you did in CS321. Click on the three tabs, Design, Split and Code. Notice that these work the same way that they did in CS321. The design mode is trickier to work with as a beginner. So for now, we will work in the code view. Click on the Code tab. Page Dissection - The Master Page Notice the first line indicates that it is a 'Master' page. The code behind indicates the file that contains C# code that will be available when this page loads. The inherits is the name of the class that represents this page. You should never change this line of code unless you are explicitly told to do so. The Title The first thing you notice are yellow tags <% %> which represent server code. Look at the title tag. The <%: Page.Title %> represents the file name of the page, the page title. <%: Page.Title %> - My ASP.NET Application This translates in the browser to: Home Page - My ASP.NET Application You also see tags that are new and begin with
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started