In ASP.NET you often require the ID of a row that you have inserted into a SQL database, either to display the record, or to use the ID to modify data in linked tables. If you are using an SqlDataSource or ObjectDataSource then you can do this with the ReturnValue method. As an example, consider t... [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]
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]
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]