While Microsoft have released their new Virtual Earth ASP.NET Control, I still haven't found a decent wrapper that converts addresses to langitude and longitude co-ordinates.  There is a Geo coder web service available here (this shows the co-ordinates for the White House) but it seems to only ... [More]
The Listview control introduced in ASP.NET 3.5 fixes a number of issues with the old Gridview and Repeater controls.  In particular, one of my biggest problems with the Gridview was the inability to add an item through an empty row in the Gridview footer.  While there are several workaroun... [More]
Full details and download link at http://msdn.microsoft.com/en-us/vstudio/products/cc533447.aspx. Visual Studio 2008 SP1 delivers: Improved WPF designers SQL Server 2008 support ADO.NET Entity Designer Visual Basic and Visual C++ components and tools (including an MFC-based Office 2... [More]

Maintaining Checkbox State in a Listview

Posted on August 10, 2008
I wrote an article recently explaining how to create a Gridview that exports selected rows to Excel, and have received a number of queries about how to do the same with a Listview.  The Listview, like the Gridview, doesn't automatically remember whether a checkbox is selected or not for each ro... [More]
Continuing on my Gridview series, the next project which had me reaching for Google was a requirement to highlight the returned search results in a Gridview.  Digging around, I found an article on 4guysfromRolla titled Highlighting Search Keywords in a DataGrid Web Control which formed the ba... [More]
If you have a Gridview that exports rows to Excel (see my article Gridview that exports selected rows to Excel for an example) and you are using Master Pages, you are likely to run into the following error: "Control 'ctl00_MainContent_Gridview1' of type 'GridView' must be placed inside a form ... [More]
I recently had a project where I needed to provide a Gridview of items that the customer could individually select and export to Excel.  The solution worked really well, so here it is for all to enjoy... This seems like a messy workaround, but I ended up using two Gridviews - one to display ... [More]
When you bind a dropdownlist to a table of data, and you try to edit an entry that contains data that has been deleted, you invariably will run into the error: 'dropdownlist1' has a SelectedValue which is invalid because it does not exist in the list of items. Consider the following example: You... [More]
Matt Berseth (http://www.mattberseth.com/) has some of the best ASP.NET 2.0 articles around, and his examples are always well documented. Matt recently wrote some articles about how to a design good looking Gridview's (Building a vs2008 Styled Grid and Gridview Themes based on Google's Personalize... [More]

Using CultureInvariantValues = true

Posted on May 24, 2008
I ran into a frustrating error recently, where my compare validator was refusing to co-operate when testing 2 dates. Here is my code: Start date: <asp:TextBox runat="server" ID="txtStartDate" Width="80px" CssClass="TextField" Text='<%# Bind(&q... [More]