protected virtual void ProcessCallbackData(ControlCallbackManager cbk) { cbk.WriteJson(new { info = string.Format("[Callback Service] Control: {0} {1} | Command: {2} | Parameter count: {3}", cbk.ControlName, cbk.ControlId, cbk.CommandName, cbk.CommandParameter.Count), msg = string.Format(cbk.CommandParameter["msg"].ToString(), cbk.CommandParameter["obj"]) }); }
protected virtual bool TakeCharge() { var cbk = new ControlCallbackManager(this.ViewContext.HttpContext); if (!cbk.IsCallback || cbk.ControlId != this.ID) { return(false); } ProcessCallbackData(cbk); return(true); }