public List<string> GetSearchPCs() { List<string> SLNo = new List<string>(); using (PCEntities myEntity = new PCEntities()) { var data = from s in myEntity.ItemSets where s.PCSLNo.Contains(txtSearch.Text) select s; foreach (var s in data) { S PCSLNO.Add(s.SlNo + " " + s.MonitorSlNo + " " + s.SNo); } return SLNo; } } //Next, just I need to bind this function to a data control: protected void txtSearch_TextChanged(object sender, EventArgs e) { GridView1.DataSource = GetSearchPCs(); GridView1.DataBind(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)