TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sanjay Kumar
NA
5k
4.4m
How to filter Gridview data using Linq Query
Oct 19 2013 2:44 AM
Select :<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true">
<asp:ListItem Text="---Select---"></asp:ListItem>
<asp:ListItem Text="StudentName"></asp:ListItem>
<asp:ListItem Text="Email"></asp:ListItem>
<asp:ListItem Text="Mobile"></asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="txtSearch" runat="server"></asp:TextBox>
<asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click" />
<div>
<asp:GridView ID="GridView1" runat="server"></asp:GridView>
</div>
private void BindGrid()
{
var query = from p in db.StudentTables select new { p.StudentID, p.StudentName,p.Mobile,p.Email };
GridView1.DataSource = query;
GridView1.DataBind();
}
Reply
Answers (
5
)
Two gridview in one page
cleartext password vulnerability