Wednesday, August 29, 2012

Linq distinct count of a value in a datatable


   var countings  = (from row in ti.Table.AsEnumerable()
                            select row["blah"].ToString()).Distinct();
            if(countings.Count<string>() > 1)
            {

Linq top N from datatable to new datatable


var dtTrec = from item in dt.AsEnumerable()
                                     select item;
                        var topN = dtTrec.Take(20);
                        DataTable dt1 = topN.ToArray().CopyToDataTable<DataRow>();

Location of installutil

may be here under the current version

C:\Windows\Microsoft.NET\Framework\

deleting windows services

from command line

sc delete blah

reduce size xap issue

I made a dll reference to local copy = false and the published xap file still had the dll

I had to clean the project for this to work

Tuesday, August 28, 2012

interesting issue with 3rd party components

if they are not properly titlecased - this will mess up the designer class  as it will copy the way its spelled in aspx page

Friday, August 24, 2012

going up paths ..

where the paths lead nowhere  (e.g. /../../../../  at http:\\blah.com/herby )will still resolve to the last place it go up to.
this can be a source of subtle bugs.