#region 系统公用弹出对话框
        /// <summary>
        /// 名称:MessageBoxYesNo
        /// 功能:弹出删除对话框 
        /// 编写人:
        /// 编写时间:2009-04-30
        /// </summary>
        /// <param name="Information">要删除的内容</param>
        /// <returns>1 删除失败 0 删除成功</returns>
        public static DialogResult MessageBoxYesNo(string Information)//通用弹出式询问对话框方法(进行互操作)
        {
            string caption = "删除确认";
            MessageBoxButtons buttons = MessageBoxButtons.YesNo;
            DialogResult result;
            result = MessageBox.Show(Information, caption, buttons, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
            return result;
        }

解决方案 »

  1.   

    web请求浏览器中不能用MessageBox提示,改为javascript的Alert吧。
      

  2.   

     DialogResult result = MessageBox.Show("确实要删除吗?", "操作提示!", MessageBoxButtons.YesNo, MessageBoxIcon.Question);        if (result == DialogResult.Yes)
      

  3.   

    程序没有在user-interactive模式下运行,此时模式对话框和消息框都是不可用的。   
    可以将SystemInformation.UserInteractive属性改为true
    ClientScript.RegisterClientScriptBlock 
      

  4.   

    怎么改SystemInformation.UserInteractive属性为true?