protected void btnSearch_Click(object sender, EventArgs e) { SPSite site = SPContext.Current.Site; KeywordQuery kq = new KeywordQuery(site); kq.SourceId = new Guid("8413cd39-2156-4e00-b54d-11efd9abdb89"); kq.QueryText = "* " + searchText.Text; kq.SelectProperties.Add("Title"); kq.SelectProperties.Add("Path"); kq.RowLimit = 20; ResultTableCollection resultTables = new SearchExecutor().ExecuteQuery(kq); DataTable resultDataTable = resultTables.FirstOrDefault().Table; List <SearchResult> searchResultList = new List <SearchResult>(); foreach (DataRow row in resultDataTable.Rows) { SearchResult searchResult = new SearchResult(); searchResult.Title = row["Title"].ToString(); searchResult.Url = row["Path"].ToString(); searchResultList.Add(searchResult); } rptSearch.DataSource = searchResultList; rptSearch.DataBind(); }