Posted on: 4/29/2015 10:04:39 AM | Views : 787

I am adding Profile Names from List 1 (Profile column) and List 2(Profile column) into asp.net DropDownList control. When user click on Profile in dropdown, it should identify if selected Profile belongs to List 1 or List 2. Can anyone suggest ?
using (SPSite site = new SPSite("My site url")) { using (SPWeb web = site.OpenWeb()) { SPQuery query = new SPQuery(); string userName = SPContext.Current.Web.CurrentUser.ToString(); userName = userName.Substring(userName.LastIndexOf("\\") + 1); SPList listconfig = web.Lists.TryGetList("SearchConfig"); query.Query = "<Where><Eq><FieldRef Name='Login_x0020_User' /><Value Type='Text'>" + userName + "</Value></Eq></Where>"; ...

Go to the complete details ...