kamagra how much to take

Get A SharePoint Field By Name

This piece of code demonstrates how you could return a SharePoint field by passing in the name parameter.

  1. private SPField GetSharePointFieldByName(string name)
  2. {
  3.         SPField field = null;
  4.         try
  5.         {
  6.                 return this._list.Fields[name];
  7.         }
  8.         catch
  9.         {
  10.         }
  11.         foreach (SPField field in this._list.Fields)
  12.         {
  13.                 if (field.InternalName.Trim().ToLower() == name.Trim().ToLower())
  14.                 {
  15.                         return field;
  16.                 }
  17.         }
  18.         return field;
  19. }
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>