Category Archives: ASP.NET

Events Not Firing in ASP.NET

There can be all sorts of reasons why events aren’t firing in a Web Form but here are a couple of things I’ve found usually cause the problems. Continue reading

Posted in ASP.NET | Tagged , , , | Comments Off on Events Not Firing in ASP.NET

Selecting a random database record with SQL

Here’s a “quick and dirty” way of selecting a database record at random. This can be used for things like showing a featured product or a random advert. Continue reading

Posted in ASP.NET, DataRowView, DataView, NEWID(), SQL, TOP, Uncategorized, VB.NET | Tagged , , , , , , , , , | Comments Off on Selecting a random database record with SQL

Conditional Formatting in a GridView

This code will allow you to change the background colour of a cell or entire row depending on certain conditions. In this example we test if the row being bound is a data row, then if the second column (indexed … Continue reading

Posted in ASP.NET, Cells, GridView, Row | Tagged , , , , , , | 6 Comments