Shiny new thing to eat up bandwidth!

I’m a solo developer in a corporate environment, so I’m really on my own to learn new things.  As good as blogs and books are, there’s sometimes no substitute for being shown how.  That’s why Microsoft highlights so many videos on its site.  ASP Alliance also has a growing library of videos.

Enter onto this list one more site–  Right now there are around 100 videos on a great number of topics.  Apparently there are a couple hundred more in the pipeline.  And, if you sign up now, you get 6 months of ASP.NET Pro magazine for free.  That alone is worth the sign-up.  ASP.NET Pro is one of my favorite trade mags (I have an online subscription, and have for several years).

When you’re Googling for info on whatever you’re working on, don’t forget to check out this site, too, and see if someone is showing you how it’s done.

Full disclosure: I was asked to say something about the new site, and I usually ignore such requests.  But after checking it it, it’s one I’ll be spending some time on, and recommending to others.

(edit – fixed links)

Error: Both DataSource and DataSourceID are defined on ‘controlname’. Remove one definition.

Assuming you don’t actually have both a DataSource and DataSourceId defined on the same control, this may actually be a bug.  My situation is Visual Studio 2008, compiling an application for .NET 2.0.  I tested this with both Enterprise Library 2.0 and Enterprise Library 3.1.  For me, I’m trying to hydrate a RadioButtonList from a dataset, which is created from a stored procedure call with a parameter passed.  If I hardcode some values in the sproc and don’t pass the parameter, it all works fine.  But, if I pass the parameter, I get the error.  I have a workaround in mind, and I’ll post it whenI get it done.

I reported this at, with an issue ID = 323454; the title is “Both DataSource and DataSourceID are defined…”.  If you’re having the same problem, log in and vote for this issue–more votes = higher priority.  The text of my report is below:

I’m using VS 2008 (9.0.21022.8 RTM), compiling for the .NET 2.0 framework.

On a web form, I’ve added a RadioButtonList, as below:

<asp:RadioButtonList ID=”rblShippingPlatform” runat=”server” CssClass=”FormFieldsAjax” />

In code behind, I call a function in a CBO in the same project to hydrate the values:

cPub.fillShippingPlatforms(rblShippingPlatform, cPublic.Segment.Lane)

The function in the CBO makes a call to the DAL, which is a shared library added as a project reference:

    Public Sub fillShippingPlatforms(ByVal rblPlatforms As RadioButtonList, ByVal sSegment As String)
        With rblPlatforms
            .DataSource = cDb.GetShippingPlatforms(sSegment)
            .DataValueField = “ShippingPlatformID”
            .DataTextField = “ShippingPlatform”
        End With
    End Sub

The DAL simply executes a stored procedure and returns a dataset:

    Public Function GetShippingPlatforms(ByVal sSegment As String) As DataSet
        dB = DatabaseFactory.CreateDatabase
        cmd = dB.GetStoredProcCommand(“lpGetShippingPlatforms”)

        With dB
            .AddInParameter(cmd, “@Segment”, DbType.String, sSegment)
            Return .ExecuteDataSet(cmd)
        End With

    End Function

There’s nothing fancy here, but when I load the web form, I receive an error stating “Both DataSource and DataSourceID are defined on ‘rblShippingPlatform’. Remove one definition. “.

I can hydrate the RadioButtonList if I adjust the stored procedure and remove the parameter handling.

    Public Function GetShippingPlatforms(ByVal sSegment As String) As DataSet
        dB = DatabaseFactory.CreateDatabase
        Return dB.ExecuteDataSet(CommandType.StoredProcedure, “lpGetShippingPlatforms”)
    End Function

This issue occurs with both the Jan 2006 and May 2007 versions of the Enterprise Library.

Taming the Page Flash Beast in ASP.NET 2.0

My buddy Shaun Eutsey had his first ASP
article published today:

Taming the Page Flash Beast in ASP.NET 2.0

Since SmartPageNavigation has gone to the wayside,
there has been no real, non-AJAX way of eliminating the flash when a postback
occurs. This code snippet will explain how to eliminate the page flash without
using AJAX.

Congrats Shaun!

Read the full article at


WebResources.axd and URLScan

Embedded resources in ASp.NET 2.0 are served up by a file listed as WebResources.axd.  If your validators aren’t working, or treeview or sitemap images aren’t showing, see if the debugging steps at fix your problem.

However, if you’re running URLScan on your server, you may need to specifically allow the .axd extension in the .ini file.  Once we did that, our sitemap was good as gold.

Review: ASP.NET 2.0 Web Parts in Action

My latest ASP Alliance article has been published: Review: ASP.NET 2.0 Web Parts in Action

ASP.NET 2.0 brought us all sorts of new technologies and one of the most exciting is Web Parts. Web Parts are versatile contols over which the end user can exhibit some level of control and form the basis of portals. In his recently published book, Darren takes us from the very basics of web parts and portals to advanced techniques of portal building. Darren’s book is well written, and illustrated with screenshots and code (which can be downloaded from the publisher’s website).

ASP.NET 2.0 Web Parts in Action

kick it on


Just Arrived – Microsoft Visual Studio 2005: Unleashed

VS 2005 Unleashed

After a couple of publishing delays, I received my copy of Visual Studio 2005: Unleashed a week or so ago (ordered for Christmas 2005).  The first thing you notice when you pick up this book is that it’s GINORMOUS.  No joke—832 pages of VS 2005 goodness.

I’m not done with it yet—not by any stretch of the imagination.  That would require a diet much higher in fiber.  But, like all books in the Unleashed series, this one is well written, with copious code samples and illustrations.

Code samples, you ask?  Oh yes, there are some.  Aside from the chapter on language enhancements in C# and VB.NET, there are examples for creating your own code snippets, writing Visual Studio 2005 add-ins, and creating templates you can share with the community.  How-to’s are illustrated with screenshots.

Informaion I’m eager to dig into includes refactoring, unit testing and managing databases via VS 2005.  I’ll have a more formal review once I reach the end.

New Starter Kit Available – TheBeerHouse: CMS & E-commerce Starter Kit

TheBeerHouse starter kit enables you to implement a website with
functionality typically associated with a CMS/e-commerce site.
This website demonstrates key features of
ASP.NET 2.0…

Features include WebParts, Master Pages, Membership & Profile, and
on-line payment clearing.  Don’t forget the SSL!

Full story at

kick it on