我是说在服务器端aspx运行的时候

解决方案 »

  1.   

    response.write("<script>confirm("确认");return false</script>")但是直接写在函数里面好象不能实现确认的功能,我没有试过.
    调用这个函数应该是通过click一个按钮来实现的吧,你可以给这个按钮加上上面的属性.
    在PAGE_LOAD事件里追加按钮的属性myButton.Attrubutes.add("OnClick","<script>confirm('确认');return false</script>")
      

  2.   

    protected void button1_OnClick(object sender ,EventArgs e)
    {
       ShowMsg("是不是这样啊?:)");
    }
    private void ShwoMsg(string message)
    {
        string tip="<script> alert('"+ message
                +"')</script>";
       Response.Write(tip);
    }
      

  3.   

    怎样做YES OR NO 的对话框呢、
      

  4.   

    看来这个问题是没有办法了,只有在 button属性里加?