Click here to Skip to main content
Click here to Skip to main content
Articles » Web Development » Ajax » General » Downloads
 
Add your own
alternative version

An Introduction to AJAX Techniques and Frameworks for ASP.NET

, 24 Aug 2006 CPOL
This article introduces AJAX to ASP.NET developers, implementing an example web page in different ways using ASP.NET Atlas, ASP.NET callbacks, Ajax.Net, Anthem.Net, and MagicAjax.Net.
introajaxaspnet.zip
IntroAjaxASPNET
article
IntroAjaxASPNET
IntroAjaxASPNET1.JPG
source
IntroAjaxASPNET
Sample
App_Code
vssver2.scc
App_Data
Items.mdf
Items_Log.ldf
vssver2.scc
App_Themes
Default
vssver2.scc
Bin
AjaxPro.dll
Anthem.dll
MagicAjax.dll
Microsoft.Web.Atlas.dll
vssver2.scc
eula.rtf
images
loading.gif
vssver2.scc
ScriptLibrary
vssver2.scc
vssver2.scc
<%@ Page Language="C#" AutoEventWireup="true"  %>
<%@ Register TagPrefix="anthem" Namespace="Anthem" Assembly="Anthem" %>

<script runat="server">
    protected void Page_Load(object sender, EventArgs e) {
        this.MaintainScrollPositionOnPostBack = true;
        ItemQuantityDisplay.Visible = false;
    }

    protected void ItemList_SelectedIndexChanged(object sender, EventArgs e) {
        ItemQuantityDisplay.Visible = true;

        try {
            ItemQuantityDisplay.InnerText =
                  String.Format(" {0} in stock",
                 Warehouse.GetItemQuantity(ItemList.SelectedValue));
        } catch (Exception ex) {
            Trace.Write("GetItemQuantity Error: " + ex.Message);
            ItemQuantityDisplay.InnerText = "Error retrieving quantity";
            ItemQuantityDisplay.Attributes["class"] = "Error";
        }
    }
</script>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>The Classical ASP.NET Way</title>
</head>
<body>
    <div class="testContent">
        <p>
            Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc sit amet massa eu
            leo condimentum ultrices. Aliquam tortor est, facilisis sed, pulvinar at, ultricies
            non, nisl. Quisque in enim in eros venenatis vulputate. Nullam pretium risus quis
            risus fringilla mattis. Sed orci. Proin cursus, ligula a tincidunt placerat, tortor
            libero malesuada magna, eleifend luctus sem quam et nisl. Quisque vulputate elit
            a augue. Curabitur sollicitudin diam vitae neque. Donec at lacus non nulla fermentum
            elementum. Nullam vitae augue. Maecenas fermentum.
        </p>
        <p>
            Praesent eget metus. Mauris a tortor eget augue tincidunt consequat. Nullam posuere
            magna vel augue. Pellentesque dictum. Nullam magna risus, dictum a, rutrum eget,
            convallis eget, elit. Integer diam. Suspendisse feugiat velit. Morbi at nisi vel
            sem egestas mattis. Duis suscipit. Proin tincidunt turpis eu quam. Etiam nec odio.
            Donec metus neque, aliquam vitae, eleifend sed, adipiscing ut, elit. Ut scelerisque
            elementum lorem. Nulla facilisi. Nam urna est, laoreet ac, commodo vitae, vestibulum
            quis, purus. Morbi ac ipsum. Sed nulla. Nulla at est. Vestibulum felis diam, tempus
            at, consectetuer ut, fermentum vel, erat.
        </p>
        <p>
            Morbi vitae ligula. Aliquam erat volutpat. Proin molestie tempus neque. Nulla suscipit
            vestibulum orci. Proin id tellus in metus accumsan volutpat. Maecenas tortor massa,
            pellentesque vitae, convallis eget, pharetra in, mauris. Aenean consequat. Suspendisse
            suscipit. Integer adipiscing porttitor erat. Suspendisse eu nulla. Donec libero
            enim, posuere non, euismod vel, tempor non, justo. Donec eget nisi vitae neque pretium
            venenatis. Morbi vitae elit sed metus luctus accumsan. Aliquam nec est ac arcu commodo
            viverra. Nam porta, lectus a mollis cursus, tortor sem malesuada nunc, eu ultricies
            pede sapien non pede. Mauris sapien eros, pharetra non, auctor sit amet, pulvinar
            sit amet, pede. Ut elementum mi eget purus. Aenean nec mi a erat aliquam imperdiet.
        </p>
        <p>
            In ornare luctus turpis. Maecenas tellus nunc, dictum elementum, tincidunt in, posuere
            ac, ligula. Integer viverra egestas mauris. Curabitur ornare nisl in libero. Donec
            ornare. Etiam cursus scelerisque dui. Nullam egestas varius risus. Cras condimentum
            dapibus dui. Nulla ac ipsum ac urna varius congue. Aenean varius quam eu libero.
            Quisque dignissim cursus mi. Suspendisse consectetuer, augue vitae cursus lobortis,
            nisi purus vestibulum sem, at vehicula lorem tellus ac risus. Sed massa erat, congue
            et, dignissim sed, congue ut, tortor. Lorem ipsum dolor sit amet, consectetuer adipiscing
            elit. Donec vehicula adipiscing dolor. Class aptent taciti sociosqu ad litora torquent
            per conubia nostra, per inceptos hymenaeos. Integer nunc libero, nonummy at, pharetra
            eget, feugiat sed, arcu. Ut et dolor. Donec aliquet justo a sapien.
        </p>
        <p>
            Donec et erat quis mi congue auctor. Mauris sodales egestas ipsum. Donec non massa.
            Nam et est eu elit iaculis porta. Quisque a tellus. Cras vulputate vehicula orci.
            Donec sit amet tortor. Fusce ullamcorper, elit vel aliquet interdum, massa purus
            porta est, id lobortis justo purus ut magna. Curabitur vitae urna. Duis id metus.
            Duis tincidunt ligula id est. Vestibulum condimentum, leo sit amet dapibus pellentesque,
            sem quam scelerisque risus, et rutrum dui risus eu lectus. Integer nibh neque, lacinia
            in, lobortis in, rutrum vitae, arcu. Vestibulum eget erat et risus consequat mattis.
            Integer suscipit, ipsum ac laoreet venenatis, lectus velit fringilla neque, ut lobortis
            risus sem non nisi. Aenean sagittis tempus velit.
        </p>
    </div>
    <form id="form1" runat="server">
        <div>
            <label for="ItemList" accesskey="I">
                Items:</label>
            <anthem:ListBox runat="server" ID="ItemList" DataSourceID="ItemsSource" DataTextField="ItemName"
                DataValueField="ItemID" EnableViewState="False" AutoCallBack="True" OnSelectedIndexChanged="ItemList_SelectedIndexChanged">
            </anthem:ListBox>
            <anthem:Panel AutoUpdateAfterCallBack="true" runat="server">
            <div id="ItemQuantityDisplay" runat="server">
            </div>
            </anthem:Panel>
            <asp:SqlDataSource ID="ItemsSource" runat="server" ConnectionString="<%$ ConnectionStrings:Items %>"
                SelectCommand="SELECT [ItemName], [ItemID] FROM [Items]"></asp:SqlDataSource>
            &nbsp;
        </div>
    </form>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Rama Krishna Vavilala
Architect
United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.141216.1 | Last Updated 24 Aug 2006
Article Copyright 2006 by Rama Krishna Vavilala
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid