1. Drag a GridView into your ASP.NET page
2. Use the following code to the fill the dtProducts DataTable with the adapter SqlDataAdapter, then bind it to the GridView1 control.
protected void Page_Load(object sender, EventArgs e) { DataTable dtProducts = new DataTable(); string connString = WebConfigurationManager.ConnectionStrings["NorthwindConnectionString"]. ConnectionString; using (SqlConnection conn = new SqlConnection(connString)) { SqlCommand cmd = new SqlCommand("SELECT * FROM Products", conn); conn.Open(); SqlDataAdapter adapter = new SqlDataAdapter(cmd); adapter.Fill(dtProducts); GridView1.DataSource = dtProducts; GridView1.DataBind(); } }
Next: SqlDbType.Date
Aivivu - đại lý chuyên vé máy bay trong nước và quốc tế
ReplyDeletevé máy bay đi Mỹ khứ hồi
mua vé máy bay từ mỹ về vn
chuyến bay thương mại từ nhật về việt nam
khi nào có chuyến bay từ đức về việt nam
giá vé máy bay từ canada về Việt Nam
gia ve may bay vietjet tu han quoc ve viet nam
chuyến bay chuyên gia