Aaron Goldenthal

Sometimes ASP.NET is Rocket Science

Creating a Gantt Chart with the MS Chart Controls

A recent project had me diving head first into creating charts in ASP.NET.  Hoping to find a free alternative, I turned to the Microsoft Chart Controls which provides a powerful set of tools to create a variety of chart types.  One of the required charts was a simple Gantt chart, which we’ll be creating here using a stacked bar chart. This article assumes you have a working level knowledge of using the Microsoft Chart Controls.  If you need help with the basics, there&rsquo... [More]

Using a Counter Table to Get a Series of Dates

There are cases where having a table of sequential integers in your database can greatly simplify certain types of queries.  One common example is to get a series of dates. To illustrate how this can be used, first we’ll create a table.  In this case there’s only one column which contains the integers, and we’ll set that as the clustered primary key. 1: CREATE TABLE [dbo].[Counters] 2: ( 3: [CounterID] [int] NOT NULL, 4: CONSTRAINT [PK_Cou... [More]

Using jQuery Impromptu With ASP.NET

I’ve been using jQuery a lot recently, and one of my favorite extensions is Trent Richardson's Impromptu.  Impromptu provides a very easy way to prompt the user for input, and is a much more flexible replacement for JavaScript alert, prompt, and confirm.  The syntax is actually very straightforward, but especially for more complex prompts it can be a little cumbersome to build the prompts.  To help simplify this, I’ve created a set of helper classes to work with Improm... [More]

Creating Custom Data Source Parameters

I’m a fan of using the data source controls to simplify data access.  While there’s a reasonable set of Parameters that come with the framework, it’s easy to quickly get to a point where you want functionality that doesn’t automatically come from one of these parameters.  You can always use the Parameter and update the value programmatically, but you can end up with a lot of logic repeated in various Inserting/Updating/Deleting events.  Luckily, creating a custom data source Param... [More]

Creating a Data Control Field – The CounterField

I’ve created a lot of GridViews to display a lot of data.  In many cases they’re simply displaying tabular data and they include one column with a counter cell, typically created with markup like: 1: <asp:TemplateField HeaderText="#"> 2: <ItemTemplate><%# Container.DataItemIndex + 1 %></ItemTemplate> 3: </asp:TemplateField> While this is not overly complicated, rather than create a field like this yet anot... [More]