求一个BUTTON  点击后关闭当前WEB窗体..的代码   还有弹出是否关闭界面还有为什么在web窗体中没有MessageBox.show()呢??
哈哈  大一新生 弱弱提问了哈!- -!

解决方案 »

  1.   

    <input type="button" value="关闭" onclick="javascript:window.close();">javascript中,MessageBox.show()相当的是:
    alert("");
    confirm("")
      

  2.   

    protected System.Web.UI.HtmlControls.HtmlInputButton Button2;private void Page_Load(object sender, System.EventArgs e)
    {
    // 在此处放置用户代码以初始化页面
    Button2.Attributes.Add("onclick","if (confrim('are you sure?'))");
    }看清楚,是
    protected System.Web.UI.HtmlControls.HtmlInputButton Button2;
    不是
    protected System.Web.UI.WebControls.Button Button2;
    不要用错button
      

  3.   

    拉一个BUTTON控件,然后在它的单击事件里面添加如下代码就行了if (MessageBox.Show("确实要退出系统吗?","询问",MessageBoxButtons.YesNo) == DialogResult.Yes)
    {
    this.Close();
    }
      

  4.   

    呵呵 原因是客户端没装NET FRAMEWORK
      

  5.   

    客户端没装NET FRAMEWORK???
    肯定装了的!!!