2005下,用Updateprocess 简单多了
ajax.dll 的话
可以这样,利用异步
Sample.ServerSideAdd(100,99, ServerSideAdd_CallBack);
//显示一个隐藏层
function ServerSideAdd_CallBack(response){
 if (response.error != null){
   alert(response.error);
   //把那个层隐藏
   return;
 }
 alert(response.value);
}

解决方案 »

  1.   

    我的程序是这样的,不知道该怎么加
    function ShowSafetyBInfo(safetybid)
    {
        CallBackList.GetSafetyBInfo(safetybid,get_SafetyInfo_Result_CallBack);
    }
    function get_SafetyInfo_Result_CallBack(response)
    {

        if (response.value != null)
        {   
    var ds = response.value; 
    if(ds != null && typeof(ds) == "object" && ds.Tables != null && ds.Tables[0].Rows.length !=0)
    {
        divsafetyinfo.style.display="block";
        document.getElementById("Lab_ZRDepName").innerHTML = ds.Tables[0].Rows[0].ZeRenDepName;
        document.getElementById("Lab_DealDate").innerHTML = ds.Tables[0].Rows[0].DealDate;
    }
        }
    }
      

  2.   

    关键是如何判断他什么时候隐藏,我觉得是在数据加载完之后隐藏,怎么判断数据已经加载完成?我也是第一次使用Ajax.dll,请各位前辈指教
      

  3.   

    ajax.dll是ajaxpro还是其他的ajax控件啊?在js调用c#代码的时候他有个状态的,就是完成了之后你需要调用一个js函数来执行你获得数据或者一些其他操作,你可以在这个js函数中将那个“loading”效果的div隐藏掉就可以了。