Follow me on Twitter at Twitter.com/wbm
FYI, I'm blogging most of my stuff over at More Wally now.
You might want to add my rss feed to your reader at:http://morewally.com/cs/blogs/wallym/rss.aspx
ASP.NET Podcast Show #53 - Atlas ListView and some Declarative Databinding - Wallace B. McClure

Wallace B. McClure

All About Wally McClure - The musings of Wallym on Web, HTML5, Mobile, Xamarin.iOS, Xamarin.Android, and Windows Azure.

News

Visual Studio Magazine Column Personal Blog

.NET

Book Authors

Business

Family

Friends

Georgia Tech Bloggers

Personal

Archives

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

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

 

Download

 

ASP.NET Podcast site: http://aspnetpodcast.com/CS11/blogs/asp.net_podcast/archive/2006/05/22/319.aspx

 

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

Posted: May 22 2006, 10:49 AM by Wallym | with no comments |
Filed under: , ,

Comments

No Comments