Subhash Sharma

Subhash Sharma
Subhash Sharma

This is Subhash Sharma(Software Engineer) Blog

Welcome to this blog and find every solution.............

Search This Blog

Software Engineer(Subhash Sharma)

Software Engineer(Subhash Sharma)
Software Engineer

Monday, September 13, 2010

Bind Data Through Linq

SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["Master2"].ConnectionString);



DataClassesDataContext db = new DataClassesDataContext(con);
var q = from empname in db.GetTable()
select empname.empid ;
GridView1.DataSource = q;
GridView1.DataBind();