Object reference not set to an instance of an object

Ruslan's ASP .NET weblog

Browse by Tags

All Tags » ASP.NET (RSS)
GridView RowDataBound Alternating Row RowState issue
This was pissing me off for a good hour: RowDataBound event after you call edit on a row, I was checking for this row's state like this: e.Row.RowState == DataControlRowState .Edit this worked fine with rows No 1, 3, 5... (non-alternating rows), however...
Sort a ListBox
I believe this method is available in .NET 3.5, but in earlier framework versions we have to implement this ourselves.. #region Helper functions /// <summary> /// Sorts the list box in descending order /// </summary> /// <param name="pList...
CSV to TextReader
/// <summary> /// Take a file path and return a TextReader /// </summary> /// <param name="file_path"></param> /// <returns></returns> private TextReader OpenFile ( string file_path) { try { // Read the CSV file in...
More Posts