1 CS 3870/CS 5870: Note 19 SiteMap and AJAX Lab 8.

Slides:



Advertisements
Similar presentations
Unit 02. ASP.NET Introduction HTML & Server controls Postbacks Page Lifecycle.
Advertisements

Module 1: Creating Responsive Pages with Ajax Creating Partial-Page Updates by Using AJAX Scripting Actions on the Web Client.
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.
Master Pages, User Controls, Site Maps, Localization Svetlin Nakov Telerik Corporation
CIS 4004: Web Based Information Technology Spring 2013
Chapter 12: ADO.NET and ASP.NET Programming with Microsoft Visual Basic.NET, Second Edition.
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
Chapter 9 Web Applications Copyright © 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved. McGraw-Hill.
ASP.NET AJAX. Content ASP.NET AJAX Ajax Control Toolkit Muzaffer DOĞAN - Anadolu University2.
Lecture 3 – Data Storage with XML+AJAX and MySQL+socket.io
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
JavaScript & jQuery the missing manual Chapter 11
Website Design CLA – Transportation. Defining a Site Select: Site – New - Site Click Next.
Database-Driven Web Sites, Second Edition1 Chapter 8 Processing ASP.NET Web Forms and Working With Server Controls.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
CSCI 6962: Server-side Design and Programming Introduction to AJAX.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
ASP.NET AJAX 1. Ordinary web applications vs. AJAX Ordinary web application The full page is updated at each request The page is not available while being.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
Chapter 10 – AJAX Dr. Stephanos Mavromoustakos. Chapter Overview AJAX (Asynchronous JavaScript And XML) Ajax allows your client-side web pages to exchange.
E-Commerce: Introduction to Web Development 1 Dr. Lawrence West, Management Dept., University of Central Florida Topics What is a Web.
Web Programming: Client/Server Applications Server sends the web pages to the client. –built into Visual Studio for development purposes Client displays.
2. Introduction to the Visual Studio.NET IDE. Chapter Outline Overview of the Visual Studio.NET IDE Overview of the Visual Studio.NET IDE Menu Bar and.
CSCI 6962: Server-side Design and Programming Introduction to Active Server Pages.
Client side web programming Introduction Jaana Holvikivi, DSc. School of ICT.
McGraw-Hill © 2009 The McGraw-Hill Companies, Inc. All rights reserved. Programming with Visual Web Developer Chapter 9.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
C# Tutorial -1 ASP.NET Web Application with Visual Studio 2005.
CSCI 6962: Server-side Design and Programming AJAX Tools in JSF and ASP.
Meeting #6 – April 2011 – Web-Technologies Homework Assignments Svetlin Nakov Telerik Corporation
1 CS 3870/CS 5870 Note04 Session Variables and Post Back.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College
Microsoft Visual Basic 2008 CHAPTER TWELVE Cell Phone Applications and Web Services.
Ventsislav Popov Crossroad Ltd.. 1. What is AJAX?  AJAX Concept  ASP.NET AJAX Framework 2. ASP.NET AJAX Server Controls  ScriptManager, UpdatePanel.
1 CS 3870/CS 5870: Note 13 Lab 6 Authentication and Authorization Roles Management.
Telerik Software Academy ASP.NET Web Forms Telerik Software Academy ASP.NET Web Forms.
Chapter 4: Working with ASP.NET Server Controls OUTLINE  What ASP.NET Server Controls are  How the ASP.NET run time processes the server controls on.
ASP.Net, Web Forms and Web Controls 1 Outline Session Tracking Cookies Session Tracking with HttpSessionState.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Bookstore Application: Middle Tier Introducing Code-Behind Files, Session State.
1 CS 3870/CS 5870: Note 20 Web Service. 2 What is Web Service? Providing functionality online to other applications, Web and Windows applications. The.
1 CS 3870/CS 5870: Note 18 SiteMap Prog8. Test 2 50 Points Thursday, Nov 12 2:00 PM – 4:00 PM Lab
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 pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
IT533 Lectures ASP.NET AJAX.
1 CS387/CS587: Note04 Lab 3. 2 Master Page All Web pages will be similar Should be created before other web pages Add New Items Controls on the Master.
1 CS 3870/CS 5870: Note 14. Prog5 Due 10 PM Wednesday, Oct 21 Authentication and Authorization 2.
1 CS 3870/CS 5870: Note07 Prog 4. Master Pages Creating a master page based on another master page MainMasterPage –For all Progs and Tests Prog4MasterPage.
1 CS 3870/CS 5870: Note07 Prog 4. Master Pages Creating a master page based on another master page MainMasterPage –For all Progs and Tests Prog4MasterPage.
Module 10: Data Access in ASP.NET. Overview Overview of the ASP.NET Data Access What is Data Access List of Data Source Control What is Data Bound How.
1 CS 3870/CS 5870: Note 19 AJAX Prog8. Test 2 50 Points Thursday, Nov 12 2:00 PM – 4:00 PM Lab
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
Chapter 1 Getting Started with ASP.NET Objectives Why ASP? To get familiar with our IDE (Integrated Development Environment ), Visual Studio. Understand.
Site Maps and Navigation
ASP.NET Forms.
ASP.NET AJAX – Basics Svetlin Nakov Telerik Corporation
Session Variables and Post Back
Working with Client-Side Scripting
CS 3870/CS 5870 AJAX Prog8.
Website Navigation.
AJAX.
© 2016, Mike Murach & Associates, Inc.
CS 3870 Prog6 Roles Management Due Monday, November 5 Group Assignment.
State management & Master Pages in asp.net
CS 3870/CS 5870 Prog 6 Site Map.
© 2015, Mike Murach & Associates, Inc.
CS 3870/CS 5870 Test 2 (50 points) Thursday
NAVIGATION CONTROLS.
Website Navigation.
Presentation transcript:

1 CS 3870/CS 5870: Note 19 SiteMap and AJAX Lab 8

Lab8MasterPage TreeView –DataSourceID –Data Source Type Site Map XML File Use Site Map 2

Site Map XML File Web.sitemap Organize the pages in the site hierarchically Must be located in the application root directory Automatically picked up by the default site- map provider SiteMapDataSource 3

Creating File Web.sitemap Right click the application root Add Add New Site Map It could be created in a sub-folder, but won’t be recognized 4

Initial Web.sitemap 5

Web.sitemap Contains only one siteMapNode element The root node can contain any number of child siteMapNode elements The child notes can have their child notes Note Properies –URL: can be empty, but no duplicate –Title –Description 6

Page Default.aspx Based on Lab8MasterPage One message Use the TreeView to navigate to the pages you want to see. 7

Page Score.aspx Select assignment Enter score for the assignment 8

Table Assignment AssignmentID : varchar(5), primary key, update not allowed MaximumPoints: tinyint DueTime: smalldatetime Description: varchar(50), allow nulls BonusPoints: tinyint 9

DropDownList Properties –DataSourceID –DataTextField : AssignmentID –DataValueField: AssignmentID Display one field of all records –AssignmentID –No other navigation controls 10

All Record Fields DetailsView Any other controls Must use the DropDownList to navigate DetailsView –PageIndex 11

Page Grade.aspx Show all selected assignments with scores Calculate the percentage and grade for each assignment Calculate the course percentage and grade based on all selected assignments 12

13 Web User Controls ScoreToGrade.ascx Similar to ShoppingItem Test3 will be on Web User Control (and others)

Web User Controls Private data Public properties Public methods Public Events Register LoadControl 14

15 Class ScoreAndGrade CheckInput –Page Score.aspx –User Control ScoreToGrade.ascx ComputePercentageAndGrade –Page Grade.aspx –User Control ScoreToGrade.ascx Should be Shared in VB

16 Class ScoreAndGrade Declare constants No Magic numbers!

ASP.NET and AJAX Processing of dynamic pages –Generate entire page on each request –Extra processing –Extra network load AJAX makes dynamic pages the same as Windows forms –Update only the controls that changed 17

ASP.NET AJAX Asynchronous JavaScript And XML Partial Page Updates with ASP.NET AJAX A Java library sent to client Calls made by the library sent back to the server The page is updated partially by the library The browser does not know it at all! 18

AJAX Extensions VS.NET ToolBox ScriptManager UpdatePanel ScriptManagerProxy Timer UpdateProgress 19

ScriptManager One on each page –the master page –the content pages 20

UpdatePanel One or more UpdatePanel on each page Properties –ContentTemplate Containing all the controls to be updated partially –Triggers Containing all controls with the events that will trigger partial update –UpdateMode Always (default) Conditional 21

22 Computing Square Root Protected Sub Button1_Click(…) Handles... txtSqrt.Text = FormatNumber(Math.Sqrt(txtInput.Text), 2) End Sub

Full Page Update Go to another page Compute three times with input –5 –50 –500 Click Back and Forward on the browser –Each computation re-displayed –Full page update 23

24 Adding AJAX Controls

Partial Page Update Go to another page Compute three times with input –5 –50 –500 Click Back and Forward on the browser –Go back to the other page –Partial page update 25

26 Button1 is Out Side of UpdatePanel

Button1 is Out Side of UpdatePanel Go to another page Come back Compute three times with input –5 –50 –500 Click Back and Forward on the browser –Full page update 27

28 Adding Trigger <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />

Adding Trigger <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" /> Partial page update 29

30 txtInput is Outside of UpdatePanel <asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />

Textbox txtInput is out side of UpdatePanel Partial page update 31

32 Clear the Input Protected Sub Button1_Click(…) Handles... txtSqrt.Text = FormatNumber(Math.Sqrt(txtInput.Text), 2) txtInpt.Text = “” End Sub Not cleared Partial page update and txtInput is excluded

Multiple UpdatePanels UpdatePanel1 –txtSqrt –Trigger: Button1 UpdatePanel2 –txtDouble –Trigger: Button2 33

34 Button Click Events Protected Sub Button1_Click(…) Handles... txtSqrt.Text = FormatNumber(Math.Sqrt(txtInput.Text), 2) txtDouble.Text = “” End Sub Protected Sub Button1_Click(…) Handles... txtDouble.Text = 2 * txtInput.Text txtSqrt.Text = “” End Sub

UpdateMode Always (Default) Conditional Apply Conditional to both UpdatePanels 35

Multiple Trggers Select UpdatePanel2 Properties Windows Triggers (Collection) Add –ControlID: Button1 –EventName: click 36

Browser Back/Forward Buttons and AJAX Five Bonus Points –Page Score.aspx –Browser back/Forward buttons work with AJAX Five Bonus Points –Page Grade.aspx –Browser back/Forward buttons work with AJAX 37