JS:
asp:
protected void Timer1_Tick(object sender, EventArgs e) { string id = ViewState["mobileid"].ToString(); if (!string.IsNullOrEmpty(id)) { DataTable dtGps = GBLL.GetList(" imei = '" + id + "' order by intime desc ").Tables[0]; if (dtGps.Rows.Count > 0) { string lat = dtGps.Rows[0]["lat"].ToString(); string lon = dtGps.Rows[0]["lon"].ToString(); hdflog.Value = lon; hdflag.Value = lat; } } } protected void timersWatch_Click(object sender, EventArgs e) { Timer1.Interval = 10 * 1000;//10秒 开启计时器 }