Below code
will help you to bind the lookup field data to the dropdown list.
if (spListItem["LookupField"]
!= null)
{
SPFieldLookupValue spv = new
SPFieldLookupValue(spListItem["LookupField"].ToString());
string lookupValue = spv.LookupValue;
dropdownlist1.SelectedIndex
= spv.LookupId;
|
dropdownlist1.SelectedValue = spListItem["Field1"].ToString();
|
WOW just what I was looking for. Came here by searching for bd web searh
ReplyDeleteLook at my blog : local searh engine