using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class _Default : System.Web.UI.Page
{
public static int a = 2;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DataClassesDataContext db = new DataClassesDataContext();
IQueryable
select s;
GridView1.DataSource = student;
GridView1.DataBind();
}
}
protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
{
if (a % 2 == 0)
{
DataClassesDataContext db = new DataClassesDataContext();
IQueryable
select s).OrderByDescending(s => s.Student_ID);
GridView1.DataSource = studentInformation;
GridView1.DataBind();
e.Cancel = true;
a++;
}
else
{
DataClassesDataContext db = new DataClassesDataContext();
IQueryable
select s);
GridView1.DataSource = studentInformation;
GridView1.DataBind();
e.Cancel = true;
a++;
}
}
}
I want a full project with linq
উত্তরমুছুনPlease Wait.................
উত্তরমুছুন