ASPxBinaryImage.ContentBytes Property
Gets or sets an array of the bytes representing the image.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v18.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Byte[] | *null* | A Byte array that contains the image’s contents. |
Example
This example demonstrates how to use the ASPxBinaryImage.ContentBytes
property.
protected void ucImageUpload_FileUploadComplete
(object sender, DevExpress.Web.FileUploadCompleteEventArgs e) {
UploadedFile uploadFile = ucImageUpload.UploadedFiles.Length == 0 ?
null : ucImageUpload.UploadedFiles[0];
Session["UploadedImageBytes"] = uploadFile.FileBytes;
}
protected void btnApply_Click(object sender, EventArgs e) {
biImage.ContentBytes = (byte[])Session["UploadedImageBytes"];
}
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ContentBytes 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.
See Also