I have the following code which retrieves all items from list "Employee Info" and bind it to Dropdown list EmployeeDD.
if (!Page.IsPostBack)
{
DataSet ds = new DataSet();
SPSite mySite = SPContext.Current.Site;
SPWeb myWeb = mySite.OpenWeb();
SPList list = myWeb.Lists["Employee Info"];
DataTable DTable_List = list.Items.GetDataTable();
DTable_List.TableName = "Table1";
ds.Tables.Add(DTable_List);
EmployeeDD.DataSource = ds.Tables["Table1"];
EmployeeDD.DataTextField = "Title";
EmployeeDD.DataValueField = "Title";
EmployeeDD.DataBind();
EmployeeDD.SelectedIndex = 0;
}
it displays all the Employees in a list.Now how do I filter the Employees based on Current logged in user and just show that user in dropdown list?