0% found this document useful (0 votes)
28 views20 pages

Developing Web Applications Using Microsoft Visual Studio 2008

The document discusses creating ASP.NET AJAX applications using Microsoft Visual Studio 2008. It covers introducing ASP.NET AJAX, creating applications using ASP.NET AJAX extensions, and extending applications using the ASP.NET AJAX Control Toolkit.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views20 pages

Developing Web Applications Using Microsoft Visual Studio 2008

The document discusses creating ASP.NET AJAX applications using Microsoft Visual Studio 2008. It covers introducing ASP.NET AJAX, creating applications using ASP.NET AJAX extensions, and extending applications using the ASP.NET AJAX Control Toolkit.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 20

Developing Web Applications

Using
Microsoft® Visual
Studio® 2008
Module 11: Creating a Microsoft ASP.NET
AJAX Application
• Introduction to ASP.NET AJAX

• Creating an ASP.NET AJAX Application by Using the


ASP.NET AJAX Extensions
• Extending an Application by Using the ASP.NET AJAX
Control Toolkit
Lesson: Introduction to ASP.NET AJAX
• What Is Asynchronous JavaScript and XML?

• What Is ASP.NET AJAX?

• Architecture of ASP.NET AJAX


What Is Asynchronous JavaScript and XML?
AJAX
• Provides techniques for creating interactive Web
applications
• Exchanges data with the Web server as a background task

• Enables Web pages to appear more responsive

• Works across platforms and uses open standards


What Is ASP.NET AJAX?
ASP.NET AJAX provides:
• Partial-page updates

• Data integration by using Web services

• Support for the most commonly used browsers

• UI elements that are familiar to users

• Integration with ASP.NET security features

• Increased efficiency because a large amount of the


processing can be carried out in the browser
• A framework that simplifies ASP.NET AJAX operations
Architecture of ASP.NET AJAX

Client Server
Microsoft AJAX Library ASP.NET AJAX Extensions

Components
Components Script
Scriptsupport
support

Browser
Browsercompatibility
compatibility Web
Webservices
services

Networking
Networking Application
Applicationservices
services

Core
Coreservices
services Server
Servercontrols
controls
Lesson: Creating an ASP.NET AJAX Application by
Using the ASP.NET AJAX Extensions
• What Are the ASP.NET AJAX Extensions?

• ASP.NET AJAX Server Controls

• Demonstration: Implementing the UpdatePanel Control

• Managing Partial-Page Updates

• Converting an ASP.NET Application to ASP.NET AJAX


What Are the ASP.NET AJAX Extensions?
• Contain the core server-side components

• Extend ASP.NET server-side control framework

• Integrate with Visual Studio 2008

• Add controls to the Visual Studio Toolbox


ASP.NET AJAX Server Controls
• ScriptManager
 Manages script resources for client components

• UpdatePanel
 Enables a refresh of part of a Web page

• UpdateProgress
 Provides the status of a partial-page update

• Timer
 Performs postbacks at defined intervals
Demonstration: Implementing the UpdatePanel Control
• Add a ScriptManager control to the Web page

• Add an UpdatePanel control to the Web page

• Add one or more controls to the UpdatePanel

• Set properties of the controls

• Add code to the controls

• Build and run the application


Managing Partial-Page Updates
• The PageRequestManager class defines events for
customizing a page’s partial-page rendering
 initializeRequest
 beginRequest
 pageLoading
 pageLoaded
 endRequest

<script type="text/javascript" language="javascript">


Sys.WebForms.PageRequestManager.getInstance()
.add_beginRequest(ReqHandler);
function ReqHandler(sender, args)
{
...
}
</script>
Converting an ASP.NET Application to ASP.NET AJAX

11 Open the existing Web application

22 Modify the web.config file for the application

33 Add ASP.NET AJAX functionality to the application


Lesson: Extending an Application by Using the
ASP.NET AJAX Control Toolkit
• Overview of the ASP.NET AJAX Control Toolkit

• Accessing the ASP.NET AJAX Control Toolkit

• Demonstration: Implementing Samples and Controls


Overview of the ASP.NET AJAX Control Toolkit
• Shared source project between the ASP.NET AJAX
community and Microsoft
• Built upon the ASP.NET 2.0 AJAX Extensions

• Contains a collection of web-client components

• Provides an infrastructure to write reusable and extensible


ASP.NET AJAX extenders and controls
Accessing the ASP.NET AJAX Control Toolkit

11 Download the latest release of the Control Toolkit

22 Unpack the Control Toolkit into a folder

33 Open or create a Web application

44 Add the Control Toolkit items to the Toolbox

55 Install the AJAX Control Toolkit templates


Demonstration: Implementing an ASP.NET AJAX
Extender Control
• Add controls from the Control Toolkit to a Web application

• Add the ConfirmButtonExtender to a Web application

• Configure the ConfirmButtonExtender control


Lab: Creating a Microsoft ASP.NET AJAX Application
• Exercise 1: Implementing Partial-Page Rendering by Using
the UpdatePanel Control
• Exercise 2: Installing and Implementing the AJAX Control
Toolkit

Logon information

Virtual machine 2310C-LON-DEV-11


User name Student
Password Pa$$w0rd

Estimated time: 30 minutes


Lab Scenario

Master Page
Logon Page benefitsMaster.master
login.aspx
Benefits Lab Web
Home Page Application
ASPState
Default.aspx Page Header
header.ascx
Menu Component
Registration Benefits.cs or Benefits.vb
register.aspx TempDB
Web.
config

Life Insurance Retirement Medical Dentists


life.aspx retirement.aspx medical.aspx dental.aspx

Prospectus
prospectus.aspx Doctors User Control XML Web
LINQ to SQL doctors.aspx nameDate.ascx Service
Classes DentalService1.asmx
Doctors.dbml

Doctors Dentists
XML Files
Lab Review
Review Questions
• What controls must you add to a page to implement
partial-page rendering?
• What steps are required before you can use a control from
the AJAX Control Toolkit?
Module Review and Takeaways
• Review Questions

• Real-World Issues and Scenarios

• Tools

You might also like