Object reference not set to an instance of an object

Ruslan's ASP .NET weblog

Browse by Tags

All Tags » Visual Studio (RSS)
Report in formatted Excel file
#region GenerateExcel private void Generate_Excel_Report() { //update month var to prev month Prev_rMonth = rMonth - 1; Prev_rYear = rYear; if ( Prev_rMonth == 0 ) { Prev_rMonth = 12; Prev_rYear = rYear - 1; } string fileName = System.IO. Path .GetFileNameWithoutExtension...
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...
AJAX UpdatePanel triggers, Conditional update mode
First of all I'd like to thank kowalskec for pointing me out the CopySourceasHTML VS add-in that will help me copy the code snippets from Visual Studio here without losing any text formatting. Cheers buddy! =) And now the task: The BugsGridView GridView...
.NET ArrayList of Objects
/// <summary> /// public class. /// </summary> public class DealerShip { ... /// <summary> /// Franchise object /// </summary> public class objFranchise { public string Name; public bool IsSales; public bool IsService; } /// <summary>...
More Posts