When adding parameters to SQL queries in code behind ASP.NET pages, the ideal syntax is to use a SQL parameter to help build your query string, rather than creating a text string on the fly. There is a trick, though, if your query contains the ‘Like’ keyword. As an example, consider the following co... [More]
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]
  Here’s a simple tip to clean up the way you display data in a repeater, by hiding rows that do not contain any data.  As an example, you may have a field in your database such as Middle Name which you want to hide if the value is empty. In this case you may have a repeater that shows i... [More]
ASP.NET membership provides the ability to authenticate users to your web application using forms based authentication against a database of users or directory services.  This article explains the steps required to provide authentication against Active Directory, either for new sites with no au... [More]
When developing web sites for clients, a simple yet powerful value added proposition is to allow your customers the ability to easily change text on their web site, such as updating contact details, news items, or promotions.  This article will show you how to integrate the popular FCKeditor H... [More]
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]
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]