tryHtmlInputButton btn1 = new HtmlInputButton();
btn1.ID="btn";
btn1.Value = "Test";
btn1.Attributes["class"] = "button";
btn1.Attributes["style"] = "Z-INDEX: 101; LEFT: 50%; POSITION: absolute; TOP: 85px";
btn.Attributes["onclick"]= "javascript:window.showModalDialog('asp.aspx ','','dialogWidth:605px;dialogHeight:275px;scroll:no;status:no;help:no;');";
this.Controls[1].Controls.Add(btn1);

解决方案 »

  1.   

    html button用js弹出页面
      

  2.   

    Response.Write("<script>alert('不会刷新的!')</script>");
    试试吧
      

  3.   

    用html button
    或者在弹出窗口的脚本后面加一句 return false;
      

  4.   

    你是不是按了回车!! 要不不会刷新的!
     
    function keytab1()
    {
      var t;
           if(event.keyCode==13)
            { 
           event.keyCode=9;  
              t=document.all("p").value
             alert(t);
            }
         }
    用这个屏蔽
      

  5.   

    Response.Write("<script>alert('不会刷新的!')</script>");