I have a list in sharepointSharePoint and it contains a lookup field .... howNow I want to insert an item to this field by code ,,list,because i have a problem in it and i but don't know how to work with the lookup field. I tried the following code but no item is added
SPFieldLookupValue gov = new SPFieldLookupValue(gv.SelectedValue); items["gov_name"] = gov.LookupValue; items.Update();
SPFieldLookupValue gov = new SPFieldLookupValue(gv.SelectedValue);
items["gov_name"] = gov.LookupValue;
items.Update();