ASPxClientCallbackCompleteEventArgs.result Property
Gets a string that contains specific information (if any) that has been passed from the server to the client side for further processing.
Declaration
result: string
Property Value
Type |
Description |
string |
A string value representing specific information passed from the server back to the client side.
|
Example
The complete sample project is available in the DevExpress Code Central database at E36.
function ShowImage(id) {
if (ASPxCallback1.InCallback())
return;
document.getElementById('imageCell').innerHTML = 'Loading...';
ASPxCallback1.PerformCallback(id);
}
<script runat="server">
protected void Page_Load(object sender, EventArgs e) {
}
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);
}
}
</script>
...
<dxcb:ASPxCallback ID="ASPxCallback1" runat="server"
OnCallback="ASPxCallback1_Callback">
<ClientSideEvents CallbackComplete="function(s, e) {
document.getElementById('imageCell').innerHTML = e.result;
}" />
</dxcb:ASPxCallback>
...
See Also