kamagra how much to take

Get SharePoint List View Items

This code sample provides method that will get the list items that are present in a SharePoint view.

  1. protected SPListItemCollection GetListViewItems()
  2. {
  3.         return this.GetListViewItems(string.Empty);
  4. }
  5.  
  6. protected SPListItemCollection GetListViewItems(string viewFields)
  7. {
  8.         try
  9.         {
  10.                 SPQuery query = new SPQuery(this.TheListView);
  11.                 if ((viewFields != null) && (viewFields.Trim() != string.Empty))
  12.                 {
  13.                         query.ViewFields = viewFields;
  14.                 }
  15.                 return this.TheList.GetItems(query);
  16.         }
  17.         catch (Exception exception)
  18.         {
  19.                 this.AddError(exception);
  20.         }
  21.         return null;
  22. }
Share

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>