Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Dan Wahlin

AngularJS, JavaScript, HTML5, jQuery, Node.js, ASP.NET, C#, XAML

  • Creating a Project Status Dashboard using ASP.NET 2.0

    When I was working as a contractor for Maricopa County in Phoenix, AZ  I was asked by the CIO to create a "quick" prototype application that would track strategic priorities, related initiatives (projects) and organizations working on the initiatives.  He wanted to track how initiatives where meeting the priorities and the status of the initiatives (on time, past due, over budget, etc.).  He wanted to see everything with a simple dashboard style Webpage that showed green lights, yellow lights and red lights.  A screen shot of the solution I threw together for him in (about a day total) using ASP.NET 2.0 is shown below:

  • GUIDs and DataSource Controls

    The DataSource controls built-into ASP.NET 2.0 make it much easier to bind data to a variety of controls.  However, as you start to customize your applications you may experience a few issues (that are typically easy to resolve).   I came across one such issue when I first used the SqlDataSource to create some admin pages awhile back.  The database I was integrating with had primary keys of type UniqueIdentifier (GUID).  The insert stored procedures accepted the key as an OUTPUT parameter and when I tried to insert a row an error was raised saying that an invalid cast occurred on the key parameter (Implicit conversion from data type sql_variant to uniqueidentifier is not allowed. Use the CONVERT function to run this query).  At first I was a bit puzzled because the parameter I specified was of type Object (the closest thing available to GUID for asp:Parameter types) and I figured that everything would automatically be figured out behind the scenes.  The StrategicPriorityID parameter shown below demonstrates how I originally defined the code in the .aspx page:

  • Converting XML Data to Relational Data with SQL 2005

    SQL Server 2005 has many features that allow XML data to be queried and manipulated. One of the features I really like is the ability to convert XML data into relational data with a minimal amount of code. For example, if you had an RSS feed stored in a column typed as "XML" but wanted developers to be able to view it in a relational manner you could use the new CROSS APPLY syntax combined with the nodes() function:

  • SQL Server 2005 CLR and XML Demos

    SQL Server 2005 provides many new features that can substantially enhance developer productivity and make it easy to perform tasks that used to be difficult in previous versions.  The download available below demonstrates several new SQL Server 2005 features including:

  • Creating an ASP.NET RSS Blog Roller with C#

    We needed an RSS blog roller for http://www.interfacett.com so we could show employee blogs from various sites.  While there are several out there for .NET we wanted something that we could build on and customize so Spike Xavier and I put together a quick class named RssBlogRoller that would read an array of blog URLs, grab a specific number of items and then sort them based upon the <pubDate> element.  It was a fun little exercise that will be useful in classes as well since it demonstrates generics, XmlReaders (and sub readers) and the ASP.NET ObjectDataSource.

  • Using SQL Server 2005 CLR Features to Create Aggregates

    I played around with SQL Server 2005 a bit this past week to explore (more in-depth) some of the different CLR features that are available.  I'll be posting a few of the things I've experimented with over the next few days.  One thing that can be really useful is the ability to create custom aggregate functions using C# or VB.NET, store them in the database and then use them within queries or stored procedures.

  • Binding Data to Tables with MS AJAX and the ListView Control

    If you've used the client-side MS AJAX controls then you know that there's no such thing as a GridView control like we're used to having on the server-side (although a GridView could be used with an MS AJAX Update Panel of course to get AJAX functionality).  When I first started using the ListView client-side control I had a hard time getting tables to show data property.  If you're unfamiliar with the ListView control it can be defined using XML Script:

  • Calling Web Services with MS AJAX using Code Vs. Declaratively

    I've been playing around with MS AJAX more these days and had some sample code working fine when using MS AJAX (formerly Atlas) controls combined with JavaScript that calls a Web Service.  Since I'm quite familiar with JavaScript I initially wrote most of the functionality using code.  For example, the following JavaScript routine calls a Web Service that returns customers in a given country and specifies the callback function that should process the returned data:

comments powered by Disqus