CallbackEventArgs.Result Property
Gets or sets a string that contains specific information (if any) that needs to be passed to the client side for further processing.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
#Property Value
Type | Description |
---|---|
String | A string value that represents any information that needs to be sent to the client-side ASPx |
#Remarks
Use the Result property if you need to pass some information to the client side to perform some client-side processing in the ASPxClientCallback.CallbackComplete event’s handler. You can pass the required information via the Result property. Typically, this can be the result of server-side processing of the CallbackEventArgsBase.Parameter property value.
#Example
function ShowImage(id) {
if (ASPxCallback1.InCallback())
return;
document.getElementById('imageCell').innerHTML = 'Loading...';
ASPxCallback1.PerformCallback(id);
}
protected void ASPxCallback1_Callback(object source,
DevExpress.Web.CallbackEventArgs e) {
string xpath = string.Format("//items/item[@id='{0}']", e.Parameter);
XmlNode node = XmlDataSource2.GetXmlDocument().SelectSingleNode(xpath);
if(node != null) {
LargeImage.ImageUrl = "Images/" + node.Attributes["FileName"].Value;
LargeImage.AlternateText = node.Attributes["Text"].Value;
LargeImageText.Text = node.Attributes["Text"].Value;
}
e.Result = ASPxCallback.GetRenderResult(ImagePanel);
}
<dx:ASPxCallback ID="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback">
<ClientSideEvents CallbackComplete="function(s, e) {
document.getElementById('imageCell').innerHTML = e.result;
}" />
</dx:ASPxCallback>
#Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the Result property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.