protected Button1_Click(object sender, EventArgs e)
{
    if(某些条件)
    {
        this.ClientScript.RegisterStartupScript(typeof(string),"js","if(confirm('确定吗?')){document.getElementById('"+Button2.ClientID+"').click();}else{document.getElementById('"+
Button3.ClientID +"').click();}",true);
    }
}
protected Button2_Click(object sender, EventArgs e)
{
     this.ClientScript.RegisterStartupScript(typeof(string),"yes","alert('你选择了是');"true);
}
protected Button3_Click(object sender, EventArgs e)
{
    this.ClientScript.RegisterStartupScript(typeof(string),"no","alert('你选择了否');"true);
}


 
                    
            
                

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
猜你喜欢
  • 2021-05-23
  • 2022-12-23
  • 2021-12-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案