コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Button1.Click   += new EventHandler(Button1_Click);
            Button1.Command += new CommandEventHandler(Buttonasdf_Command);

            Label1.Text = "IsPostBack: " + IsPostBack.ToString() +
                          "<br />   Callback: " + IsCallback.ToString() +
                          "<br />   SupportsXmlHTTP: " + Page.Request.Browser.SupportsXmlHttp.ToString();

            Label3.Text = ClientScript.GetPostBackEventReference(LinkButton1, null);
            string cbReference = Page.ClientScript.GetCallbackEventReference(this,
                                                                             "arg", "GetRandomNumberFromServer", "context");
            string cbScript = "function UseCallback(arg, context)" +
                              "{" + cbReference + ";" + "}";

            Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "UseCallback", cbScript, true);

            //HttpContext.Current.ApplicationInstance.
        }
コード例 #2
0
 protected void ASPxCallbackPanel1_Callback(object sender, DevExpress.Web.CallbackEventArgsBase e)
 {
     throw new System.ArgumentException("This is a callback error: " + IsCallback.ToString());
 }