Using the XmlDataSource Data property for easy samples
More Atlas stuff : Using the XmlDataSource Data property for easy samples: "Using the XmlDataSource Data property for easy samples
Here's a little trick to write samples that involves data binding controls to a database. It's very inconvenient to have to package a sample database with your code (especially when it's just a few lines of code in a blog), and just making sure your users have SQL Server installed is no small thing. All this just diverts the attention from what really matters: your sample code.
It's a little-known feature that XmlDataSource enables you to declaratively expose sample data to the page. Here's how it's done:
System.Drawing.Color)).ConvertFromString((string)Eval('value')) %>'
Text='<%# Eval('name') %>' />
I just returned from speaking at the ASP.NET Connections conference in Orlando which was a lot of fun. If you haven't ever attended before I highly recommend it. I had a chance to meet a few other speakers I hadn't met before as well as talk with a lot of conference attendees that were building some cutting-edge ASP.NET applications. I gave 3 different talks at the conference and promised everyone that I'd add the slides and code....so here it is.
Migrating from Web Services to SOAs
Building N-Tier ASP.NET Applications
Synchronous and Asynchronous Web Services
Although the conference was a blast, I have to say that I had the "