Thought I would document this, since it took me a while to gather all the information to do it, but once I got it, it was very useful. I searched things like how to create a string indexed array and, multidimensional arrays and lists to eventually find the Dictionary Type, very powerful, and you can link it with objects/classes and lists to extend it. Essentially I was running a SQL query where I am building a complex table using a number of conditions, and could not use GridView because of that. But I also wanted a total at the bottom. So created a Total Table in the asp page. Then in the code file this is what I added: class ItemTotals { public string ItemDesc { get; set; } public double TotalsQty { get; set; } } //---- // code to run query... which returns into oleData //---- string _strItemDesc = oleData["ItemDesc"].ToString(); if (sumItemTotals.ContainsKey(_strItemDesc)) { sumItemTotals[_strItemDesc].TotalsQty += Conver...
Just some opinions and things I have committed to virtual prosperity just in case UGAF