Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.

Similar presentations

Presentation on theme: "1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS."— Presentation transcript:

1 1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS

2 2 Static Web Pages Original HTML documents Remaining the same after created and modified At all times and to all users All three pages of Lab1 are static

3 3 Static Web Pages Cannot be used for business operations No user input Cannot respond to different user requests

4 4 Dynamic Web Pages Interactive or Smart HTML pages User input and Server Response Web Applications Similar to Windows programs Lab 2

5 5 Special HTML Controls To get user input Element INPUT Element BUTTON Element FORM …

6 6 Control Types Created with INPUT Text Password Checkbox Radio box Submit Reset Hidden Button File Image...

7 7 HTML Forms Controls to get user input should be inside HTML forms

8 8 HTML Controls and Forms Example Source Code

9 9 HTML Standards HTML 4.01 Specification HTML Current Status

10 10 Scripts for Dynamic Web Pages User input and Server Response Similar to Windows programs Need code to respond to user input –Client Side Scripting –Server Side Scripting –Combination of above two approaches

11 11 Client Side Scripting HTML files and instruction files sent to client Client Script JavaScript VBScript Java Applets Flash...

12 12 Issues with Client Side Scripting Different browsers may interpret instructions in different ways Database is normally at server site Users could view source code

13 13 Server Side Scripting Instruction files are at server site HTML files are generated according to user input Only HTML files are sent to clients

14 14 Issues with Server Side Scripting Most computing is done at the server Nothing will work when the server is down More internet traffic Powerful and expensive servers

15 15 Different Technologies for Server Side Scripting CGI (Common Gateway Interface) JSP (Java Server Pages) PHP (Personal Home Pages) ASP (Active Server Pages) ASP.NET...

16 16 ASP.NET A server-side technology for creating dynamic web pages Client-side scripting is incorporated (e.g., to check input) VB.NET or any other language supported by.NET Working with MS IISMS IIS

17 17 Internet Information Services (IIS) IIS waits and takes client requests IIS sends static HTML files to the clients IIS passes client requests to ASP.NET when needed ASP.NET generates dynamic web pages IIS sends dynamic web pages to clients

18 18 Windows Server Xray In domain ION Our Web Sites Individual student accounts Each student has a Web site on Xray

19 19 Open Your Web Site on Xray Start VS 2012 Open Web Site Remote Site Login using your UWP UserName and Password Do not try New Project or New Web Site!

20 20 Lab 2 20 points Due 5 pm, Monday, September 15 Sample Program

21 21 Creating Folder Solution Explore Right Click on Web Site New Folder Lab2

22 Creating Web Forms Solution Explorer Right clicking folder Add Web Forms 22

23 23 Page Default.aspx Similar to index.html Static page for Lab2 Similar to pages of Lab1

24 Adding Content to Default.aspx Similar to Lab1 Copy and Paste, including the CSS file Web Protocols, Technologies and Applications Qi Yang 24

25 25 External CSS Files in Other Locations CS3870/CS5870 – Lab2 Absolute link Relative link

26 26 Page OrderingProduct.aspx Dynamic page Adding controls Adding code VB C#...

27 Creating Page OrderingProduct.aspx Solution Explorer Right clicking folder Add Add New Items –Visual basic –Web Form –File name –Place code in separate file –(Select Master Page) 27

28 28 ASP.NET Server Controls HTML Server Controls –HTML server controls are HTML tags understood by the server 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. All S erver Controls must be within a tag. All S erver Controls must have the runat="server" attribute.

29 29 Adding and Formatting Controls ToolBox Standard (not HTML) Setting control properties Style –Source View Format Menu –Set Position Absolute Relative CSS file

30 Event Procedures Same as Windows programs Compute Square Root TextBox2.Text = FormatNumber(Math.Sqrt(Textbox2.Text), 2) 30

31 31 Formatting Output Style in HTML source Properties Window VB.NET procedures in VB file VB function –Format –FormatCurrency –...

32 Checking Input Click event of button Compute Server site scripting Client site scripting should be better Should do it on both sites Control Validator 32

33 Validators ToolBox Validation Tab RequiredFieldValidator RangeValidator CompareValidator –Type –Operator –Value to compare 33

34 34 Validation Controls Validate input automatically We don’t check input any more Must set button property CausesValidation to True!

35 35 Lab 2 You will lose five points for each late day! Even the server is having issues! More to discuss Thursday! No Lab Time for Lab2!

Download ppt "1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS."

Similar presentations

Ads by Google