ASPxCallback.GetRenderResult(Control) Method
Returns the HTML representation of a specific control.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v21.2.dll
NuGet Package: DevExpress.Web
Declaration
Parameters
Name | Type | Description |
---|---|---|
control | Control | A Control object that specifies the control whose HTML code should be returned. |
Returns
Type | Description |
---|---|
String | A string that contains the HTML code representing the specifid control. |
Remarks
Use the GetRenderResult method to obtain the HTML code representing a specific control. This method can be used in a handler of the ASPxCallback.Callback event to render the required web control after it’s been updated on the server side. The obtained HTML code can then be assigned to the event’s CallbackEventArgs.Result property, and sent to the client-side ASPxClientCallback.CallbackComplete event. On the client side, this code (obtained via the ASPxClientCallbackCompleteEventArgs.result parameter) can be used to replace/update the required control’s HTML representation.
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);
}