Read List Item Form Library

Read List Item Form Library

using (SPSite objSite = SPContext.Current.Site)

using (SPWeb objWeb = objSite.OpenWeb())


SPList objList = objWeb.Lists[“MKSLib”];

SPQuery objListQuery = new SPQuery();

objListQuery.Query = “<Where><Eq><FieldRef Name=\”ArtworkNumber\” />
<Value Type=\”Text\”>” + strFilterCriteria + “</Value></Eq></Where>”;

SPListItemCollection objItemColl = objList.GetItems(objListQuery);

DataTable dtbl = objItemColl.GetDataTable();

//Here You can write your custom business logic



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s