Presentation is loading. Please wait.

Presentation is loading. Please wait.

Desert Code Camp Ajax Enabling a Web site using AjaxPro.NET Joseph Guadagno

Similar presentations


Presentation on theme: "Desert Code Camp Ajax Enabling a Web site using AjaxPro.NET Joseph Guadagno"— Presentation transcript:

1 Desert Code Camp Ajax Enabling a Web site using AjaxPro.NET Joseph Guadagno

2 Requirements ASP 1.1 C# VB.NET (possibly) JavaScript DHTML AjaxPro.NET Library (http://www.ajaxpro.info/)

3 What will be covered What is Ajax? XMLHttpRequest Object Dynamic HTML (DHTML) Creating the dynamic web site

4 Quick Comments I tried to make the demos somewhat useful. The demos build upon each other. The UI is not the best but pretty good. There is probably a better way to do some of the JavaScript functions I will not cover the business objects created (unless asked)

5 What is Ajax Asynchronous JavaScript and XML (AJAX) is not a technology in itself, but is a term that describes a "new" approach to using a number of existing technologies together, including: HTML or XHTML, Cascading Style Sheets, JavaScript, The Document Object Model, XML, XSLT, and the XMLHttpRequest object. When these technologies are combined in the AJAX model, web applications are able to make quick, incremental updates to the user interface without reloading the entire browser page. This makes the application faster and more responsive to user actions.

6 XMLHttpRequest A HTTP Response that returns an XML document. Reference Site (http://jibbering.com/2002/4/httprequest.ht ml)

7 Basic Steps Add the reference to AjaxPro.DLL Register the page for AjaxPro.NET –AjaxPro.Utility.RegisterTypeForAjax(typeof(Namespace.class)); Add the AjaxMethod attribute to the method –[AjaxPro.AjaxMethod()] Add the JavaScript function to call the method Optional – Create the call back function

8 JavaScript Functions Main Function function LoadList() { Namespace.Class.Method(param1, param2, function_callback); }

9 Callback Function //callback we told Ajax.Net to pass the response to function Function_CallBack(response) { //if the server side code threw an exception if (response.error != null) { DisplayError(response.error, "LoadEngagementTeams"); return; } var teams = response.value; //if the response wasn't what we expected if (teams == null || typeof(teams) != "object") { var Message = "An unexpected error happened retrieving the teams list"; DisplayError (Message, "LoadEngagementTeams"); } for (var i = 0; i < oTeamList.Rows.length; ++i) { oControl.options[oControl.options.length] = new Option(oTeamList.Rows[i].team, oTeamList.Rows[i].team); } hideIndicator(); }

10 Links Internet Explorer Developer Toolbar  BB3E-2D5E1DB91038&displaylang=en BB3E-2D5E1DB91038&displaylang=en Microsoft Developer’s Network (http://msdn.microsoft.com) Mozilla / Firefox Developers Center (http://www.mozilla.org/developer/)http://www.mozilla.org/developer/ AjaxPro.NET Support Group (http://groups.google.com/group/ajaxpro?lnk=lr ) Other Ajax – Google Groups Ajax World (http://groups.google.com/group/ajax-world)http://groups.google.com/group/ajax-world Ajax-Web-Technology (http://groups.google.com/group/ajax-web- technology)

11 Questions


Download ppt "Desert Code Camp Ajax Enabling a Web site using AjaxPro.NET Joseph Guadagno"

Similar presentations


Ads by Google