.net用AJAX怎样做到无刷新删除啊,
我点击删除后,只有刷新一下才能看到删除效果。  
  //根据ID删除方法
        function doDel(id){
           if(confirm("您确定要删除吗?")){
               xhr.open("get","list.ashx?do=d&id="+id+"",true);
               xhr.setRequestHeader("If-Modified-Since","0");  //不使用缓存
               xhr.onreadystatechange=function(){
               if(xhr.readyState==4){
                    if(xhr.status==200){
                       var res=xhr.responseText;
                       //若果是这样alert(res)说出的话,得到的还是一个字符串{status:1},所以
                       //我们还要用eval方法转一下,成json对象
                       //alert(res);                        
                      var json=eval("("+res+")");
                      //遍历,判断返回的是什么值 1还是-1
                      switch(res.status){
                           case -1:
                             alert("参数错误");
                              window.location="list.htm";   //跳转到当前页面,即刷新一下
                           break;
                           case 0:
                              alert("删除失败,请稍后再试");
                           break;
                           case 1:
                              removeRowById(id);                           
                           break;
                      }                         
                    }
               }
             }
              xhr.send(null);
           }
        }  
  //删除后删除行
        function removeRowById(id){
            var tbL=document.getElementById("tbList");  //获得表格对象
            for(i=0;i<tbL.rows.length;i++)
            {
                if(tbL.rows[i].childNodes[1].innerHTML==id){
                   //tbL.deleteRow(i);   //删除 对应下标 的行对象
                   document.getElementById(" tbL.deleteRow(i)").hidden=true;
                   break;
                }
            }
        }
//
cs
   //删除业务事件
         void SoftDell(HttpContext context)
         {
             //获取页码
             string strId = context.Request.QueryString["id"];       //id是传递的参数名,要与前面一致
             int intid = 0;
             //将字符串id 转成 整形id
             if (!int.TryParse(strId, out intid))
             {
                 //若果参数错了
                 context.Response.Write("{status:-1}");              
             }
             else  
             {
                 string sqlstr = "delete from board where BoardId=" + strId + "";
                 Common common = new Common();
                 //return common.ExecuteNonQuery(sqlstr);
                 //因为调用删除的方法成功则是返回非-1的任何数,反之,返回-1则失败               
                 if ((common.ExecuteNonQuery(sqlstr)) != -1)   //执行数据库删除
                 {
                     //删除成功
                     context.Response.Write("{status:1}");
                 }
                 else
                 {
                     //删除失败
                     context.Response.Write("{status:0}");
                 }
             }        
         }
------解决方案------