ASP.NET Podcast

ASP.NET Podcast is geared towards the Microsoft .NET Framework and ASP.NET.
The podcast is run by Wally McClure, David Penton, and Paul Glavich.
Welcome to ASP.NET Podcast Sign in | Join | Help
in Search

ASP.NET Podcast

The ASP.NET Podcast features, technical talks, interviews, news, reviews, and Wallyisms. Wallace B. (Wally) McClure, David Penton, and Paul Glavich are your hosts. We talk about ASP.NET, AJAX, Performance, Databases, WCF, Silverlight, Cloud Computing, Windows Azure, and whatever else we decide to talk about.

ASP.NET Podcast Show #53 - Atlas ListView and some Declarative Databinding

Subscribe – Be like Wally (ok, maybe thats not the best idea)

 

Download

 

Show Notes:

  • Doug Reilly.
  • Todd Miranda.
  • Dell goes to AMD!
  • Source:
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="DeclarativeDatabinding.aspx.cs" Inherits="Databinding_Databinding" %>

<!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>Declarative Databinding Page</title>

</head>

<body>

<form id="form1" runat="server">

<atlas:ScriptManager runat="server" ID="ScriptManager1" >

    <Services>

        <atlas:ServiceReference GenerateProxy=true Path="WebServiceProjects.asmx" />

    </Services>

</atlas:ScriptManager>

<input type="button" id="btnGetData" value="Get Project List" onclick="GetData()" />

<script language="javascript">

 

    function GetData()

    {

        WebServiceProjects.GetProjects(OnServiceComplete);

    }

 

    function OnServiceComplete(result)

    {

        debug.dump(result, "Returned data.");

        var projectName = $("ProjectResults");

        projectName.control.set_data(result);

    }

</script>

<div id="ProjectResults">

</div>

<div id="ProjectTemplate">

This is a list of all project in the table tblProject:<br />

<div id="ProjectItemTemplate">

    Project: <strong><span id="ProjectNameLabel"></span></strong>

</div>

</div>

</form>

<script type="text/xml-script">

<page xmlns:script="http://schemas.microsoft.com/xml-script/2005">

<components>

    <listView id="ProjectResults"

        itemTemplateParentElementId="ProjectTemplate" >

        <layoutTemplate>

            <template layoutElement="ProjectTemplate" />

        </layoutTemplate>

        <itemTemplate>

            <template layoutElement="ProjectItemTemplate">

                <label id="ProjectNameLabel">

                    <bindings>

                        <binding dataPath="ProjectName" property="text" />

                    </bindings>

                </label>

            </template>

        </itemTemplate>

    </listView>

</components>

</page>

</script>

</body>

</html>

Published Monday, May 22, 2006 3:40 PM by admin
Filed under: ,
Anonymous comments are disabled

This Blog

Syndication

Powered by Community Server, by Telligent Systems