protected void timer1_Tick(object sender, EventArgs e)
{
foreach (RepeaterItem item in rpChat.Items)
{
TextBox txt = item.FindControl("txtChatMessage") as TextBox;
if (txt != null)
{
message[i] = txt.Text;
i--;
}
}
lblStatusChat.Text = "";
RepeaterBind();
string javaScript = "<script language=JavaScript>\n" + "alert('Button1_Click client-side');\n" + "</script>";
Page.ClientScript.RegisterStartupScript(this.GetType(), "myKey", javaScript);
}
timer_click
触发器和更新面板。并且警报消息不会出现在 timer_tick 事件上