Presentation is loading. Please wait.

Presentation is loading. Please wait.

ASP.NET Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital.

Similar presentations


Presentation on theme: "ASP.NET Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital."— Presentation transcript:

1 ASP.NET Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Suhardi.suhaimi@pb.edu.bn Digital Media Department Politeknik Brunei

2 Contents What is ASP.NET? What is IIS? What is ASP.NET File? How Does ASP.NET Work? Installing Visual Studio Create ASP.NET Website with VS Express 2012 for Web 2

3 Contents Cont. Location Options Files & Folders Used by ASP.NET Web Application Location of Web Site Files Inserting ASP.NET Code Into The Web pages Code-Behind Example Create ASP.NET Website With VS Express 2012 for Web 3

4 Contents Cont. ASP.NET Server Controls HTML Server Controls Web Server Controls Validation Server Controls 4

5 What is ASP.NET? Definition: ASP -> Active Server Pages Superset of HTML + Programs that get rendered (the Active part) into plain HTML.Net A well done but enormous object oriented distillation of all the services of Windows 5

6 What is ASP.NET? ASP.NET A server side scripting technology that enables scripts (embedded in web pages) to be executed by an Internet server. A Microsoft Technology. A program that runs inside IIS. 6

7 ASP.NET Development Models Supports three different development models: Web Pages MVC -> Model View Controller Web Forms 7

8 ASP.NET Development Models Web Pages Simplest ASP.NET model Similar to PHP and classic ASP Built-in templates and helpers for database, video, graphics, social media and more 8

9 ASP.NET Development Models MVC Separates web applications into 3 different components Models for data Views for display Controlers for input 9

10 ASP.NET Development Models Web Forms The traditional ASP.NET event driven development model: Web pages with added server controls, server events, and server code 10

11 What is IIS? IIS (Internet Information Services) is Microsoft's Internet server. IIS comes as a free component with Windows servers. IIS is also a part of Windows 2000 and XP Professional. 11

12 Other Example of “Active” Pages Take “Active” to mean that a server processes non-HTML information to generate a final HTML page Many other examples: PHP, Perl, Active Java, javascript (client), Active Python, etc Without a concept of “Active” pages, every conceivable page would be “hard coded” 12 12

13 What is ASP.NET File? An ASP.NET file is just the same as an HTML file. An ASP.NET file can contain HTML, XML, and scripts. Scripts in an ASP.NET file are executed on the server. An ASP.NET file has the file extension.aspx. 13

14 ASP.NET Page The typical ASP.NET page is two files foo.aspx Page layout foo.aspx.cs“Code Behind” implementation The “.cs” refers to C# Separation of layout from implementation is a VERY good thing 14

15 How Does ASP.NET Work? When a browser requests an HTML file, the server returns the file. When a browser requests an ASP.NET file, IIS passes the request to the ASP.NET engine on the server. The ASP.NET engine reads the file, line by line, and executes the scripts in the file. Finally, the ASP.NET file is returned to the browser as plain HTML. 15

16 Installing Visual Studio You may opt to download and install Microsoft Visual Studio 2012 or Microsoft Visual Studio Express 2012 for Web Both have the trial version of 30 days and an extend of 90 days after you registered on the 30 th day of the trial. Do not register before your 30 days trial is over. 16

17 Installing Visual Studio Cont. System Requirements (MS Visual Studio 2012/Express 2012 for Web): Supported Operating Systems are Windows 8, Windows 7, Windows Vista SP2, Windows XP SP3+, Windows Server 2003 SP2+, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012. You must have a live Internet connection. You must have administrator privileges on your computer to run the Web Platform Installer. 17

18 Installing Visual Studio Cont. Hardware Requirements: 1 GHz or faster processor 512 MB of RAM 850 MB of available hard disk space (x86) 2 GB hard drive (x64) 18

19 Installing Visual Studio Cont. Register VSEW online and get a key. Enter the key in the VSEW start-up screen If you’re using a commercial version of Visual Studio, there might be an option of different collections of settings the first time you start Visual Studio. The choice you make on that dialog box influences the layout of windows, toolboxes, menus, and shortcuts. 19

20 Installing Visual Studio Cont. Choose the Web Development settings because those settings are designed specifically for ASP.NET developers. You can always choose a different profile later by resetting your settings 20

21 Create ASP.NET Website with VS Express 2012 for Web Step 1: Select File -> New Web Site 21

22 Create ASP.NET Website with VS Express 2012 for Web Cont. Step 2: Select ASP.NET Web Site from the dialog box 22

23 Location Options Default is File System: where web site is created in your machine on a local folder. HTTP: A web site is created under the control of IIS server. FTP: A web site is created on a remote hosting server that has IIS and ASP.NET installed. 23

24 Files & Folders Used by ASP.NET Web Application Solution Explorer contains folders as in: The other folders that can occur inside a project are: App_Themes, Bin, etc. 24

25 Location of Web Site Files Suppose you create a website WebSite1, the files will be located inside: .sln file C:\Users\moe6\Desktop\WAD Materials\WebSite1  All other files (.aspx,.aspx.cs, web.config, etc.) C:\Users\moe6\Desktop\WAD Materials\WebSite1 25

26 Inserting ASP.NET Code Into The Web Pages 3 ways of inserting ASP.NET code into your web page:  Inline code blocks  Script tags  Code-Behind Technique Code-behind model separates HTML (presentation layer), from program logic (server-side code). This eliminates the dangerous practice of writing spaghetti code that is prone to error. 26

27 ASP.NET Server Controls There are three kinds of server controls:  HTML Server Controls Traditional HTML tags  Web Server Controls  Validation Server Controls For input validation 27

28 HTML Server Controls HTML server controls are HTML tags understood by the server. The purpose is to allow existing HTML elements to be processed by ASP.NET pages, and hence they map directly to existing HTML tags. Add a runat="server" attribute to the HTML element to indicate that the element should be treated as a server control. 28

29 Web Server Controls Web server controls are special ASP.NET tags understood by the server. Web server controls do not necessarily map to any existing HTML elements and they may represent more complex elements. The syntax for creating a Web server control is: 29

30 Web Server Controls Cont. Some of the web server controls are:  asp:Label  asp:ListBox  asp:DropDownBox  asp:TextBox  asp:RadioButton and asp:RadioButtonList  asp:CheckList and asp:CheckListList  asp:Button  asp:Image  asp:HyperLink  etc….. 30

31 Validation Server Controls Validation server controls are used to validate user-input. If the user-input does not pass validation, it will display an error message to the user. The validation server controls available are: 31

32 Contact For Tutorial and Notes Cikguhadi.com Suhardi.suhaimi@pb.edu.bn Digital Media Department Politeknik Brunei Welcome to WADT


Download ppt "ASP.NET Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital."

Similar presentations


Ads by Google