SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Server side

SPWeb site = SPContext.Current.Web;
                SPList list = site.Lists["GridList"];
                SPListItemCollection items = list.Items;
                DataTable dt = items.GetDataTable();
                Gridnames.DataSource = dt;

client side

function getToolInfo() {

       // var CamlQuery = "<Query><Where><Eq><FieldRef Name='Title'/><Value Type='Counter'>" + lastID + "</Value></Eq></Where></Query>";
        var CamlViewFields = "<ViewFields><FieldRef Name='Title' /><FieldRef Name='Description' /></ViewFields>";

        // this let me know that the function is getting called and passed the correct parameter value
        alert('function called and passed last ID of : ' );
            operation: "GetListItems",
            async: false,
            listName: "GridList",
            CAMLViewFields: CamlViewFields,
            // CAMLQuery: CamlQuery,
            completefunc: function (xData, Status) {
                $(xData.responseXML).find("[nodeName='z:row']").each(function () {
share|improve this question
up vote 0 down vote accepted

It's really not a question of which method is "faster", but what your requirements are. There are times where one or the other method is preferable, but it really depends on the context.

share|improve this answer

I will suggest to go with server side call if there is an option and to have a better performance from the server. These calls are handled by the core libraries and client object model calls are handled by a different libraries which takes the calls in batches.

If the question is specific to performance and if there is scope for server side implementation then I strongly suggest to go with server side calling.

At times we require asynchronous calling to server and in these scenarios client object model is preferable.

Hope this helps you!!!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.