你可以直接写在控件上,例如按钮
private void Button4_Click(object sender, System.EventArgs e)
{
if (TextBox1.Text="")
{
Button4.Attributes.Add("onclick","return confirm('确实要删除当前行记录吗?');");
}
}
private void Button4_Click(object sender, System.EventArgs e)
{
if (TextBox1.Text="")
{
Button4.Attributes.Add("onclick","return confirm('确实要删除当前行记录吗?');");
}
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货