请教大家一个关于ASP。NET的问题,我有没有办法在服务器端得到javascript中弹出消息框后用户所按的按钮是什么 

解决方案 »

  1.   

    ajax没学会前,可以试试改变一个隐藏控件的值,然后在服务器端获取这个值
      

  2.   

    http://topic.csdn.net/u/20100405/14/226b9ce0-20a3-4c33-9dbf-72ea9ab83699.html看看这贴子,口口加一的回复
      

  3.   

    使用jQ或者prototype.jsif(confirm('确定导出?')==true)
                {
                   var body="参数="+exhid;
    new Ajax.Request('一个页面.aspx',
                                    {
                                    method:'post',
                                    postBody:body,
                                    onComplete:function(response)
                                    {
                                    var t=response.responseText;
                                         if(t=="1")
                                                {
                                                    //alert('成功!');
                                                    
                                                }
                                                else
                                                    if(t=="2") 
                                                    {
                                                        //alert('失败!');
                                                        
                                                    }
                                    
                                    }
                                    }
                                 )
                }
                else
                {
                    //类似上面.........
                 }
      

  4.   

    其实就是 在点击 js弹出框 中的 确定 或 取消 按钮时。将所要执行的操作用ajax方式 传送到某页面处理。
      

  5.   

    if(confirm('确定导出?')==true)
                {
                   var body="参数="+exhid;
    new Ajax.Request('一个页面.aspx',
                                            {
                                                method:'post',
                                                postBody:body,
                                                onComplete:function(response)
                                                {
                                                    var t=response.responseText;
                                                    if(t=="1")
                                                    {
                                                        //alert('成功!');
                                                        
                                                    }
                                                    else
                                                    if(t=="2") 
                                                    {
                                                        //alert('失败!');
                                                        
                                                    }
                                                    
                                                }
                                            }
                                     )
                }
                else
                {
                    //类似..
                 }
      

  6.   

    Ajax不会  看来需要学习一下了