Web Development in Microsoft Visual Studio 2013

Slides:



Advertisements
Similar presentations
ASP.NET Ajax Supplementary Tutorial. Why Use ASP.NET AJAX? - I ASP.NET AJAX enables you to build rich Web applications that have many advantages over.
Advertisements

11 Getting Started with ASP.NET Beginning ASP.NET 4.0 in C# 2010 Chapters 5 and 6.
Web Server Programming
Working with ASP Pages. Slide 2 The Tag (1) Remember that most ASP.NET pages contain a single tag with the runat attribute set It’s possible to have multiple.
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview Introduce Visual Studio 2013 Create a first ASP.NET application.
Web-Based Applications
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Creating a Console Application with Visual Studio
Microsoft Visual Basic 2005 CHAPTER 8 Using Procedures and Exception Handling.
UNIVERSIDAD TECNOLÓGICA ECOTEC. ISO 9001:2008 Module 2 Creating Web Applications by Using Microsoft® Visual Studio 2010 and Microsoft.NET–Based Languages.
ASP.Net, Web Forms and Web Controls 1 Outline Introduction Simple HTTP Transaction System Architecture Creating and Running a Simple Web Form Example Web.
Chapter 9 Web Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
Introduction to.Net and ASP.Net Course Introduction Build Your Own ASP.Net Website: Chapter 1 Microsoft ASP.Net Walkthrough: Creating a Basic Web Forms.
9-1 aslkjdhfalskhjfgalsdkfhalskdhjfglaskdhjflaskdhjfglaksjdhflakshflaksdhjfglaksjhflaksjhf.
Tutorial: Introduction to ASP.NET Internet Technologies and Web Application 4 th February 2010.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College
.Net is a collection of libraries, templates and services designed to make programming applications of all kinds, easier, more flexible (multi platform),
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
McGraw-Hill/Irwin © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Dynamic Action with Macromedia Dreamweaver MX Barry Sosinsky Valda Hilley.
Beginning Web Site Development Module 1 – Dynamic Web Site Development Fundamentals of building dynamic Web sites with ASP.NET 2.0 and C# Version.
Programming with Microsoft Visual Basic 2012 Chapter 12: Web Applications.
Chapter 9 Programming with Web Forms Programming In Visual Basic.NET.
ASP.NET Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
© Minder Chen, ASP.NET 2.0: Introduction - 1 ASP.NET 2.0 Minder Chen, Ph.D. Framework Base Class Library ADO.NET: Data & XML.
Introduction to ASP.NET 1www.tech.findforinfo.com.
CSCI 6962: Server-side Design and Programming Introduction to Active Server Pages.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Programming with Visual Web Developer Chapter 9.
Lecture Set 1 Part C: Understanding Visual Studio and.NET – Applications, Solutions, Projects (no longer used – embedded in Lecture Set 2A)
The Web Architecture and ASP.NET. Slide 2 Review of the Web (1) It began with HTTP and HTML, which delivers static Web pages to browsers which would render.
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Introduction In The Name Of Allah, The Beneficent, The Merciful.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files.
Introduction to ASP.NET T.Ahlam Algharasi. The Visual Studio IDE Start page 2.
Web Development in Microsoft Visual Studio Slide 2 Lecture Overview How to create a first ASP.NET application.
Introduction to Web Services. Examples Using a Web Service Creating a new Web Service.
Module 2: Using Microsoft Visual Studio.NET. Overview Overview of Visual Studio.NET Creating an ASP.NET Web Application Project.
ASP.NET in Definition: 1.ASP.NET is a web application framework developed and marketed by Microsoft to allow programmers to build dynamic web sites,
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Web Development in Microsoft Visual Studio 2013 / 2015.
Lecture Set 2 Part A: Creating an Application with Visual Studio – Solutions, Projects, Files 8/10/ :35 PM.
11 Getting Started with ASP.NET Beginning ASP.NET in C# and VB Chapters 1 and 2.
1111 Creating HTML Programatically Objectives You will be able to Invoke C# code on the server from an ASP.NET page. Write C# code to create HTML.
Working with ASP.NET Controls What is ASP.NET Using server controls in your pages Allowing users to create their own accounts Creating a login page Letting.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Microsoft Expression Web - Illustrated Unit A: Getting Started With Microsoft Expression Web.
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
 Lecture  Website language: ASP.net  Book name Beginning ASP.NET 4 in C# and VB 2.
1 Introducing Web Developer Tools Rapid application development tools ASP.NET-compatible web editors –Visual Studio.NET Professional Edition –Visual Studio.
Building CSS in Visual Studio Slide 2 Introduction Using the different HTML (and other) Visual Studio Editors CSS tools.
Chapter 2 Creating Website with Web Forms. Objectives Understand the different project types and templates when building ASP.NET web sites. The different.
Chapter 1 Getting Started with ASP.NET Objectives Why ASP? To get familiar with our IDE (Integrated Development Environment ), Visual Studio. Understand.
MIS 3200 – C# (C Sharp)
ASP.NET Forms.
Chapter 2: The Visual Studio .NET Development Environment
ASP.NET Web Controls.
Introduction to ASP By “FlyingBono” 2009_01 By FlyingBono 2009_01
3.01 Apply Controls Associated With Visual Studio Form
© 2016, Mike Murach & Associates, Inc.
Active Server Pages ASP.Net
Using Procedures and Exception Handling
Module 1: Getting Started
Introduction to Internet Programming
Anatomy of an ASP.NET Page
Chapter 9 Programming with Web Forms
ASP.NET Imran Rashid CTO at ManiWeber Technologies.
Programming with Microsoft Visual Basic 2008 Fourth Edition
Presentation transcript:

Web Development in Microsoft Visual Studio 2013

Lecture Overview Introduce Visual Studio 2015 Create a first ASP.NET application

Introduction to Visual Studio 2013 All ASP.NET development and testing can take place inside of Visual Studio 2015 A local Web server is provided for testing purposes It’s part of Visual Studio 2015 Intellisense works for server code and JavaScript, XHTML, and HTML5 It works similarly to what you saw in IS350 and IS360

Visual Studio Windows The Toolbox contains HTML controls and ASP.NET controls Drag control instances using Design or Source view The Solution Explorer lists the application’s files The Properties window is used to set object properties Other windows work as you would expect

Creating an ASP.NET Application (Web Site) You create a Web site in much the same way as you create a desktop project Click File / New / Web Site In the New Web Site dialog box Select ASP.NET Web site Select the desired folder (The folder should be empty or not already exist) Note that different framework versions are supported

New Web Site Dialog Box (Illustration)

Solution Explorer Files (1) Web forms (.aspx) make up the visual forms They are HTML5 documents There is a code behind file (.aspx.cs) Web.config contains configuration information It’s an XML document

Solution Explorer Files (2) If you select a Web Forms site, jQuery is included in the default template in the folder Scripts Site.master contains the application menu Styles contain cascading style sheets (.css)

Solution Explorer Files (Illustration)

Parts of the Designer Surface Most windows work as you expect but the contents differ from those you see in desktop applications Solution Explorer contains project files but these files are very different from desktop files Toolbox controls look like desktop controls but they are not desktop controls The visual designers work differently too

Adding a Web Form Every .aspx file corresponds to a Web page Click Website / Add New Item Select Web Form Select the master page, if desired Set the name as desired

Adding a Web Form

The Web Form Editor The Web Form editor allows you to Create HTML5 Create ASP.NET server side tags Create the “code behind” the form in a language such as Visual Basic or C# The Web form editor has three views Design / Split / Source

The Web Form Editor

Default Web Page Code (HTML) A Web Form contains a @Page directive More later but it’s this directive that makes the page a Web form The remaining HTML should look familiar to you Note there is exactly one <form> tag ASP.NET controls must appear in the <form>

Default Web Page (HTML)

The Code Editor An ASP.NET Web page is made up of two files The .aspx file contains the HTML The .aspx.cs file contains the VB or C# code It works the same way as the Code Editor for desktop applications The event names differ a bit Page_Load instead of Form_Load for example

The Code Editor

Toolbox Controls They are different controls than those used for desktop applications HTML controls are standard HTML controls that will work with any browser Other controls are server side controls that only work with IIS and ASP

Using Controls Using the Toolbox, drag the desired control to the design surface You can drag to the design surface or the HTML editor Set properties using the Properties window Create event handlers using the Properties window

ASP.NET Controls ASP controls have an <asp:> prefix. These are actually XML namespaces

Creating Event Handlers (1) ASP.NET control events vary significantly from desktop events There are no server side focus events (Why?)

Creating Event Handlers (2) There are a couple of ways to do this The easiest way is to select Design View Then double-click the control to create the “default” event handler Or use the event tab on the Properties window Or create it by hand

Event Handler Example

Page Inspector On the server ASP writes HTML5 code All of the ASP stuff is stripped away Use the Page Inspector to see the emitted code In the Solution Explorer, right click the Web Site and select View in Page Inspector

Setting the Start Page Every Web site has exactly one page designated as the start (default) page To set the start page, right-click the page in the Solution Explorer Click Set as Start Page

Setting the Start Page

Running the Application It’s possible to run an ASP.NET application from Visual Studio There is a “test” Web server built in Just press F5 to run the application It appears in the default Web browser You will see a message to enable debugging when the application is run the first time

Running the Application

Debugging Debugging windows work the same way in desktop and ASP.NET applications Set breakpoints on executable code lines Print values to the Immediate window Use Watch windows to interrogate the values of variables It’s possible to debug client-side Java script Note that script debugging must be enabled

Introduction to Error Handling Just like desktop applications, exceptions are thrown in various cases Divide by 0, IO, Database, etc. Unhandled, we call these the yellow page of death What happens depends on the following Web.config setting: <compilation debug="false">

Error Message (Debug=true)

Error Message (Debug=false)

Error Message – Enabling Debugging

Error Message – Enabling Script Debugging

Tracing (Introduction) It’s possible to trace execution by enabling tracing in the Web.config file @Page directives can also be used Example <trace enabled="true" pageOutput="true"/>

Tracing (Output)