if (lkupField != null)
{
System.Guid g = new Guid(lkupField.LookupList);
SPList lookupList = webTestSite.Lists[g];
SPQuery query = new SPQuery();
query.Query = "
+ "
SPListItemCollection Items = lookupList.GetItems(query);
if (Items != null && Items.Count > 0)
{
string Value = Items[0].ID + ";#" + Items[0][lkupField.LookupField];
listItemHelp[field.name] = Value;
}
}
No comments:
Post a Comment