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]

Editing date and time in a Formview

Posted on May 17, 2008
This is a simple example for how to provide an editing interface for date and time fields.  Say that you are storing Booking details and your BookingDate field contains both the date and time, eg '21/05/2008 10:30:00 AM' If you wanted to display the date and time strings seperately you can ... [More]

Referencing data in a Formview

Posted on May 10, 2008
When I first started programming in ASP.NET, the Formview was indispensable in displaying and manipulating data.  Eventually though, I needed access to individual fields within the Formview, and that's when I found many examples showing how to access field data  using the Ctype syntax to r... [More]