A newer version of this page is available.
Switch to the current version.
ASPxBinaryImage.ContentBytes Property
Gets or sets an array of the bytes representing the image.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v18.2.dll
Declaration
[DefaultValue(null)]
public virtual byte[] ContentBytes { get; set; }
<DefaultValue(Nothing)>
Public Overridable Property ContentBytes As Byte()
Property Value
Type | Default | Description |
---|---|---|
Byte[] | null |
A Byte array that contains the image's contents. |
Examples
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"];
}
See Also
Feedback