ASP.NET AJAX. Content ASP.NET AJAX Ajax Control Toolkit Muzaffer DOĞAN - Anadolu University2.

Slides:



Advertisements
Similar presentations
Module 1: Creating Responsive Pages with Ajax Creating Partial-Page Updates by Using AJAX Scripting Actions on the Web Client.
Advertisements

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.
Web Server Programming
User Controls, Master Pages, GridView. Content User Controls Styles, Themes, Master Pages Working with Data GridView Muzaffer DOĞAN - Anadolu University2.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…
ASP.Net AJAX. AJAX Asynchronous JavaScript and XML: – JavaScript, Document Object Model, Cascade Style Sheet, XML, server-side script such as.Net, etc.
WHAT IS AJAX? Zack Sheppard [zts2101] WHIM April 19, 2011.
Microsoft ASP.NET AJAX - AJAX as it has to be Presented by : Rana Vijayasimha Nalla CSCE Grad Student.
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
1 JavaScript & AJAX CS , Spring JavaScript.
Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
UNIT-V The MVC architecture and Struts Framework.
Client/Server Architectures
LAYING OUT THE FOUNDATIONS. OUTLINE Analyze the project from a technical point of view Analyze and choose the architecture for your application Decide.
JavaScript & jQuery the missing manual Chapter 11
5/5/2005Toni Räikkönen Internet based data collection from enterprises using XML questionnaires and XCola engine CoRD Meeting May 11th 2005.
11/13/2007 A synchronous J avaScript A nd X ML Gloria Law Joshua Mahaz.
ASP.NET + Ajax Jesper Tørresø ITNET2 F08. Ajax Ajax (Asynchronous JavaScript and XML) A group of interrelated web development techniques used for creating.
Yahoo! User Interface (YUI) Library Natly Mekdara.
AJAX in ASP.NET James Crowley Developer Fusion
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.
INTRODUCTION TO FRONTPAGE. TOPICS TO BE DISCUSSED……….  Introduction Introduction  Features Features  Starting Front Page Starting Front Page  Components.
WDV 331 Dreamweaver Applications Snippets and Libraries Items Dreamweaver CS6 Chapter 18.
10 Adding Interactivity to a Web Site Section 10.1 Define scripting Summarize interactivity design guidelines Identify scripting languages Compare common.
Chapter 10 – AJAX Dr. Stephanos Mavromoustakos. Chapter Overview AJAX (Asynchronous JavaScript And XML) Ajax allows your client-side web pages to exchange.
AJAX and Atlas in ASP.NET 2.0 William J. Steele MSDN Developer Evangelist Microsoft Corporation
Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and check boxes using HTML Add a pull-down.
Murach’s ASP.NET 4.0/VB, C1© 2006, Mike Murach & Associates, Inc.Slide 1.
CSCI 6962: Server-side Design and Programming AJAX Tools in JSF and ASP.
Joe Hummel, PhD Dept of Mathematics and Computer Science Lake Forest College
Ventsislav Popov Crossroad Ltd.. 1. What is AJAX?  AJAX Concept  ASP.NET AJAX Framework 2. ASP.NET AJAX Server Controls  ScriptManager, UpdatePanel.
Building Rich Web Applications with Ajax Linda Dailey Paulson IEEE – Computer, October 05 (Vol.38, No.10) Presented by Jingming Zhang.
Database Handling, Sessions, and AJAX. Post Back ASP.NET Functionality The IsPostBack method in ASP.NET is similar to the BlackBerry.refresh method –IsPostBack.
Telerik Software Academy ASP.NET Web Forms Telerik Software Academy ASP.NET Web Forms.
Real-World AJAX Seminar - March 13, 2006 Bringing the Richness and Responsiveness of Desktop Applications to the Web Sahil Malik telerik.
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.
Quick overview of ASP.NET Ajax Ajax deep-dive Cover some key real-world problems Discuss solutions, patterns, opportunities Lots of demos And more of.
AJAX 10 Most Common Mistakes. 1. Not giving immediate visual cues for clicking widgets. If something I'm clicking on is triggering Ajax actions, you have.
1 CS 3870/CS 5870: Note 19 SiteMap and AJAX Lab 8.
the acronym for Asynchronous JavaScript and XML.
Ajax for Dynamic Web Development Gregory McChesney.
Building AJAX-Enabled Applications with ASP.NET AJAX Framework Peter Ty Developer Evangelist Microsoft Hong Kong
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
 AJAX – Asynchronous JavaScript and XML  Ajax is used to develop fast dynamic web applications  Allows web pages to be updated asynchronously by transferring.
1 What is JQuery. jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax* interactions.
IT533 Lectures ASP.NET AJAX.
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
Learning Aim C.  Creating web pages involves many considerations.  In this section we will look at the different software tools you can use and how.
1 CS 3870/CS 5870: Note 19 AJAX Prog8. Test 2 50 Points Thursday, Nov 12 2:00 PM – 4:00 PM Lab
ASP.NET AJAX Fedorov Sergey, student of Computing Mathematic and Cybernetics faculty, software department, NNGU
Scripting - Client-side vs. Server-side Scripting
 2009 Pearson Education, Inc. All rights reserved.
ASP.NET Forms.
ASP.NET AJAX – Basics Svetlin Nakov Telerik Corporation
Not a Language but a series of techniques
Working with Client-Side Scripting
CS 3870/CS 5870 AJAX Prog8.
Section 17.1 Section 17.2 Add an audio file using HTML
Application with Cross-Platform GUI
AJAX.
AJAX.
© 2016, Mike Murach & Associates, Inc.
Cookies BIS1523 – Lecture 23.
MIS Professor Sandvig MIS 424 Professor Sandvig
JavaScript.
ASP.NET Module Subtitle.
AJAX By Prof. B.A.Khivsara
Presentation transcript:

ASP.NET AJAX

Content ASP.NET AJAX Ajax Control Toolkit Muzaffer DOĞAN - Anadolu University2

Postback Model So far, you’ve learned to build web pages that use the postback model. With the postback model, pages are perpetually being sent back to the web server and regenerated. During the postback, the entire page is refreshed, including the parts that haven’t changed. This produces a distracting flicker. Muzaffer DOĞAN - Anadolu University3

Ajax Recently, a new generation of web applications has begun to appear. These applications refresh themselves quickly and flicker-free, and sometimes include slick new features like animation and drag and drop. Examples: Gmail, Google Maps. Muzaffer DOĞAN - Anadolu University4

Ajax This new breed of web applications uses a set of design practices and technologies known as Ajax. Ajax is programming shorthand for a set of techniques that create more responsive, dynamic pages. One of the hallmarks of Ajax is the ability to refresh part of the page while leaving the rest untouched. Ajax is the short form of Asynchronous Javascript and XML. Muzaffer DOĞAN - Anadolu University5

Ajax: The Good Responsiveness Better experience for the user Your web application seems more modern and sophisticated You can distinguish your web site from other competing similar websites Ajax offers new features that aren’t possible in traditional web pages. Uses more Javascript Muzaffer DOĞAN - Anadolu University6

Ajax: The Bad Complexity You need to write Javascript codes (fortunately, we’ll use ASP.NET’s Ajax-enabled features in the class) Browser Support Works only on major browsers Web pages that use Ajax often do a lot of work on a single page. Muzaffer DOĞAN - Anadolu University7

ASP.NET AJAX Toolkit JavaScript isn’t terribly complex, but it’s remarkably difficult to program correctly, for two reasons: Details vary from browser to browser JavaScript is a notoriously loose language that tolerates many minor typos and mistakes. Catching these mistakes and removing them is a tedious process. In the class, we won’t use Javascript directly. Instead, we’ll use a higher-level model called ASP.NET AJAX. ASP.NET AJAX gives you a set of server-side components and controls that you can use when designing your web page. Muzaffer DOĞAN - Anadolu University8

ASP.NET AJAX Toolkit Controls Script Manager Script Manager Proxy Update Panel Timer Update Progress Muzaffer DOĞAN - Anadolu University9

The Script Manager In order to use ASP.NET AJAX, you need to place a ScriptManager control on your page. It is the brains of ASP.NET AJAX. The ScriptManager doesn’t generate any HTML tags. Instead, the ScriptManager adds the links to the ASP.NET AJAX JavaScript libraries. Each page that uses ASP.NET AJAX features requires an instance of the ScriptManager. However, you can only use one ScriptManager on a page. Muzaffer DOĞAN - Anadolu University10

The Script Manager The script manager needs to appear before the Ajax controls. It’s a good idea to always place the script manager at the top of the page. Muzaffer DOĞAN - Anadolu University11

Script Manager and Master Pages You might choose to place the ScriptManager in a master page. However, this can occasionally cause problems, because different content pages may want to configure the properties of the ScriptManager differently. The solution is to use the ScriptManager in the master page and the ScriptManagerProxy in content pages. Each content page can configure the ScriptManagerProxy control in the same way it would configure the ScriptManager. Muzaffer DOĞAN - Anadolu University12

Partial Refreshes The key technique in an Ajax web application is partial refreshes. With partial refreshes, the entire page doesn’t need to be posted back and refreshed in the browser. Instead, when something happens the web page asks the web server for more information. The request takes place in the background, so the web page remains responsive. When the web page receives the response, it updates just the changed portion of the page. Muzaffer DOĞAN - Anadolu University13

Muzaffer DOĞAN - Anadolu University14

Update Panel ASP.NET includes a handy control that lets you take an ordinary page with server-side logic and make sure it refreshes itself in flicker-free Ajax style using partial updates. This control is the UpdatePanel. The basic idea is that you divide your web page into one or more distinct regions, each of which is wrapped inside an invisible UpdatePanel. When an event occurs in a control that’s located inside an UpdatePanel, and this event would normally trigger a full-page postback, the UpdatePanel intercepts the event and performs an asynchronous callback instead. Muzaffer DOĞAN - Anadolu University15

A Note on FileUpload FileUpload and HTML File Input controls can’t be used in an UpdatePanel since they require full-page postbacks. You can use third party software for asynchronous file upload. One alternative is the AsyncFileUpload in the AJAX Control Toolkit, which is a free AJAX library implemented by Microsoft. Muzaffer DOĞAN - Anadolu University16

Conditional Updates In complex pages, you might have more than one UpdatePanel. In this case, when one UpdatePanel triggers an update, all the UpdatePanel regions will be refreshed. You can configure the panels to update themselves independently. Simply change the UpdatePanel.UpdateMode property from Always to Conditional. Now, the UpdatePanel will refresh itself only if an event occurs in one of the controls in that UpdatePanel. Muzaffer DOĞAN - Anadolu University17

Triggers You can explicitly tell the UpdatePanel to be updated by the controls that aren’t inside the UpdatePanel. In order to achieve this functionality, you can add Triggers to the UpdatePanel. Muzaffer DOĞAN - Anadolu University18

Muzaffer DOĞAN - Anadolu University19