Wednesday, April 20, 2011

decimal control in double value

There were situation double values are to be controlled only to 3 decimal or 2 decimal.
This one line code does the exact function.
        double d = 42.566454648;
        double d1 = 23.545548125;
        double d2 = d + d1;
        Response.Write(d2.ToString("N3"));

Monday, April 11, 2011

two column filtering - AND CAML

Filtering the rows on two column condition on CAML query





India




Chennai




I have a sharepoint list contains the columns
Country | City | Price1 | Price2|
Records will be
India | Chennai | 254.3 | 536.5
UAE | Dubai | 500.24| 65.21