protected void Page_Load(object sender, EventArgs e) { ProductGridView.EnableDynamicData(typeof(Product)); //Bind product GridView ProductGridView.DataSource = ctx.Products.ToList <Product>(); ProductGridView.DataBind(); }