====== ASP.NET Auto Refresh ====== public void BindData() { con = new SqlConnection("Initial Catalog=Northwind; Data Source=localhost; Uid=sa; pwd=;"); cmd.CommandText = "select * from Employees "; cmd.Connection = con; con.Open(); da = new SqlDataAdapter(cmd); da.Fill(ds); cmd.ExecuteNonQuery(); GridData.DataSource = ds; GridData.DataBind(); } protected void Timer1_Tick(object sender, EventArgs e) { Label1.Text = "Grid Refreshed at: " + DateTime.Now.ToLongTimeString(); }
 

 
 

[[https://www.c-sharpcorner.com/article/auto-refresh-data-on-page-using-ajax/|Quelle]] {{tag>[ASP.NET UpdatePanel AJAX Auto_Refresh Refresh Example Beispiel]}}