1.首先繼承  ICallbackEventHandler
2.在Page_Load 裡面 

            ClientScriptManager scriptManager = this.Page.ClientScript;
            string eventRef = scriptManager.GetCallbackEventReference(this, "argVal", "OnCallComplete", "ctxVal", "OnErrorOccurs", true);


3.Server:


    /// <summary>
    /// 接受客戶端的參數 進行運算
    /// </summary>
    /// <param name="eventArgument"></param>
    public void RaiseCallbackEvent(string eventArgument)
    {
        strCallResult = voidtt();
    }


     /// <summary>
    /// 返回CallBack的結果
    /// </summary>
    /// <returns></returns>
    public string GetCallbackResult()
    {
        return strCallResult;
    }


4.For Example:

Net 2.0 CallBack 流程<html xmlns="http://www.w3.org/1999/xhtml" >
Net 2.0 CallBack 流程
<head runat="server">
Net 2.0 CallBack 流程    
<title>Untitled Page</title>
Net 2.0 CallBack 流程    
>



Net 2.0 CallBack 流程    public string outputCount = "";
Net 2.0 CallBack 流程    
protected void Page_Load(object sender, EventArgs e)
    }

相关文章: