30 August 2007 10:29
If you want to find which CheckBoxes were selected in a multiple record DataBound control, the way that you you do it depends on the type of control you use. These examples demonstrate a CheckBox control being added to a GridView, Repeater and a DataList. For simplicity, I have placed all three controls on the same page, and used the Access version of theNorthwind database. One AccessDataSource control is used to bind the results of "SELECT [CategoryID], [Description], [CategoryName] FROM [Categories]" to all three controls.
25 August 2007 12:34
25 August 2007 10:32
Label controls in ASP.NET don't have a smart tag that allows you to select a data source, so at first glance, it is not easy to see how to bind a value returned from a SqlDataSource or AccessDataSource control to the label. Here's how to programmatically access the data returned by such a DataSource and apply it to a non-databound control.
21 August 2007 11:36
A list of standard ASP.NET web controls that implement INamingContainer
18 August 2007 23:12
I like reading Scott Guthrie's blog. Trouble is, I get so busy, I forget to go over there and have a look to see what's new. I was searching for something the other day, and stumbled across someone else's blog (I forget whose), but I noticed that they had the 5 most recent items in Scott's blog embedded in their home page. It was only then that I discovered that Scott Mitchell has written a whole load more tutorials on Data Access, and that these have been available for a while. So I got to thinking that I should add a feed from Scott G's site onto the home page here, so I can be updated more quickly. Here's the bare bones of how I did it.
17 August 2007 10:28
As an ardent Dreamweaver user for classic ASP, I used to debug my scripts with a plethora of Response.Write and Response.End statements, outputting the values of various values to the browser to check that logic was working as intended. However, I recently discovered how to use the VS 2005 debugger to make debugging classic ASP (almost) a joy.
10 August 2007 21:33
Iterating the contents of a folder is straightforward using classes from System.IO, and listing them as links to the actual file just requires a bit of html added to each file name.
02 August 2007 23:41
A question that often comes up in forums is how to export data to a CSV file, or other text format. Here's a method that takes data from a DataReader and writes it to a file.