Making a List, Checking it Twice (Cool Ajax Sample App with ASP.NET 2.0 and Atlas)
page 1 of 6
Published: 26 Dec 2005
Unedited - Community Contributed
Abstract
In this article, Scott demonstrates a cool Ajax sample application with ASP.NET 2.0 and the Atlas Framework.
by Scott Guthrie
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 24869/ 46

Introduction

Republished with Permission - Original Article

In case you haven’t checked out the new Atlas preview release yet (which given that it shipped a few days ago and almost everyone is on vacation this week is very likely), you might want to consider finding some time to-do so when you get a chance and are back online.  It makes common Ajax-style scenarios a breeze to build, and really makes programming a lot of fun. 

I played around using the Atlas drop with ASP.NET 2.0 a few days ago on a plane ride to the east-coast, and put together a simple task/to-do list application that shows off one of the new features that comes with it (specifically the new <atlas:updatepanel> server control that allows you to use any shipping ASP.NET server control and get incremental Ajax-style updates in your ASP.NET 2.0 application).

You can download the full source-code to the application here.  Feel free to re-use/modify/re-ship it however you want.

Basically, this simple sample I built provides a basic interface to create/manage/delete lists, and then items within those lists.  What is neat is that all of the inserts, updates, deletes, sorts, and paging operations within the application are done in an Ajax way (where only the list is updated in the browser – which makes the app feel really snappy and alive).  What is really cool is the fact that I was able to enable this without having to write any javascript, or learn/use any new data or input controls (I used only the built-in textbox, dropdownlist, button, gridview, repeater and objectdatasource controls in the sample – together with the new <asp:updatepanel> control which is conceptually pretty simple to understand).  I wrote ~40 lines of code to enable all the screenshots below (I could have easily done it in less than half of that – but I wanted to show off some fancier data transformations in the lists as well as enable RSS) – and I was able to build all of the core app functionality from scratch in less than 15 minutes (including creating the database, the data tier, and the UI code). 

I’ll walkthrough how this all works after the sceenshots below – although obviously the best way to learn about it yourself is to download the sample and run it on your local system (note: if you have the free Visual Web Developer Express tool installed and SQL Express active, then you should be able to just copy the above .zip file to your local hard-drive, expand it, open the web-site and hit run).  Note: I used CSS for all style information, and I’ve tested the markup output from the sample and it should be XHTML compliant.


View Entire Article

User Comments

Title: ERROR PROBLEM   
Name: tahir ASlam
Date: 2008-07-22 12:38:42 PM
Comment:
Sirr
I have tried this code as was needed for my project but am having a problem specifially in the line


Lists.ListsDataTable listData=listAdapter.GetBy(true);

Plus i did not understand what this statment would do even if it would ve not thrown any error so kindly would you be able to explain tht to me please>?>>
WOuld really appreciate your help
Thank you
Title: Anthem URL   
Name: Mathias
Date: 2006-08-08 4:58:44 AM
Comment:
Entering an URL didn't work...
http://www.anthemdotnet.com/
Title: I prefer Anthem   
Name: Mathias
Date: 2006-08-08 4:57:56 AM
Comment:
I prefer Anthem over Atlas... Check the site above.
Title: MR   
Name: Uday Shetty
Date: 2006-08-07 5:01:13 AM
Comment:
since many days i was wondering how to start ajax. In fact I had gone through many examples, but i was not successful. Finally I came across this example and i am thru.

I am very thankful to Mr Scott for this remarkable article. I wanted a srating point, which I found here. Now I can work on this technology & improve my knowledge on this.

Uday Shetty
India
Title: mr   
Name: chandra
Date: 2006-07-25 2:08:58 AM
Comment:
xie2 ni, thank you, arigato
Title: 100% worth to read - Excellent   
Name: Suchi
Date: 2006-07-08 1:47:45 AM
Comment:
Very good explanation. Its really helped me to understanding basic things. Thanks for your time.
Title: Excellent!   
Name: Nigel Bird (England)
Date: 2006-07-06 7:54:21 AM
Comment:
Just to say well done, I found this article very usefull. Thanks for taking the time to post it.
It has been apprecieated.... By the way it works just fine!

much regards
Title: it dosent work   
Name: Ramzy N.Ebeid
Date: 2006-07-03 11:08:52 AM
Comment:
dear sir
i make the sample as you say and it dosent work
and i dont know why ????
can you help me please
there is no errors






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-23 9:01:44 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search