Hi,
I'm trying to add search functionality to my page. Part of my page is as follows;
student.aspx
.
.
.
<asp:TextBox ID="txtFilter" runat="server" Text=""/>
<asp:Button ID="btnFilter" runat="server" Text="Filter" OnClick="btnFilter_Click"/>
<asp:ListView
ID="StudentsListView"
runat="server"
InsertItemPosition="LastItem"
DataKeyNames="StudentID"
ItemType="WebFormsTest.Models.Student"
SelectMethod="StudentList">
.
.
.
i'm being able to list, create, update, delete operations successfully.
student.aspx.cs
public IQueryable<Student> StudentList()
{
return db.Students;
}
protected void btnFilter_Click(object sender, EventArgs e)
{
if (!String.IsNullOrEmpty(txtFilter.Text))
{
string strCriteria = txtFilter.Text.ToString();
var query = from s in db.Stude ...
Go to the complete details ...