我利用这个做ARCGIS SERVERE开发,但是不知道怎么回事老是不能实现无刷新回调

解决方案 »

  1.   

    http://wangguorui89.javaeye.com/blog/491757
      

  2.   

    public partial class ClientCallbacks : System.Web.UI.Page, ICallbackEventHandler 
    {
       protected string txtInfo; 
        protected void Page_Load(object sender, EventArgs e)
        {
            //动态注册JavaScript 
            String cbReference = Page.ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerData", "context");
            String callbackScript;
            callbackScript = "function CallServer(arg, context)" + "{ " + cbReference + ";}";
            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "CallServer", callbackScript, true);
        }
        //引发Callback事件处理 
        public void RaiseCallbackEvent(string txtFirstName)
        {
            this.txtInfo = "引发Callback事件处理";        
        }
        //返回Callback结果 
        public string GetCallbackResult()
        {
            return txtInfo;  
        } }
    function ReceiveServerData(txtInfo) 
        {     } 
    ICallbackEventHandler