public string GetCallbackResult() { this.SaveViewState(); try { CallBackGetResultEventArgs e = new CallBackGetResultEventArgs(); CallBackGetResultEvent(this, e); return(e.StringToClient); } catch { return("GetResult Event is not implemented"); } }
void filterCallBack_CallBackGetResultEvent(object sender, CallBackGetResultEventArgs e) { StringWriter writer = new StringWriter(); HtmlTextWriter buffer = new HtmlTextWriter(writer); this.RenderControl(buffer); string markup = writer.ToString(); markup = markup.Trim(); markup = markup.Substring(markup.IndexOf(@"<div id=""__gv" + this.ClientID + @"__div""")); markup = markup.Substring(0, markup.Length - 6); e.StringToClient = markup; }