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

Thursday, February 24, 2011

MVC2 Template Helpers

Templated Helpers

In ASP.NET MVC 2.0 newly added feature is Templated Helpers.This allows you to create display screens and
editable screens.
It strongly supports the refactoring,intellisense and compile time checking.
<%= Html.DisplayFor(m => m.Name) %>
Alternatively you can try the
Html.EditorFor()
<%= Html.LabelFor(m =>m.Name) %>

Friday, February 18, 2011

SharePoint 2010 Developer Dashboard

This will allows the developer to detect the critical modules, web parts and queries in the hosted SharePoint applications.
It lets the developer to analyses the each request and response’s time and each method’s responding time.
So the developer can easily locate the errors and resolve them.

To Activate this feature through stsadm tool

Stsadm -o setproperty -pn developer-dashboard -pv on

after these command you will get "Operation Successful" message.


To Deactivate
Stsadm -o setproperty -pn developer-dashboard -pv off