Skip to main content
Tab

BinaryImageEditProperties.StoreContentBytesInViewState Property

Gets or sets a value that specifies whether the editor’s content (represented by an array of bytes) should be stored within its view state between postbacks,

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(false)]
public bool StoreContentBytesInViewState { get; set; }

Property Value

Type Default Description
Boolean false

true to maintain the editor’s content bytes within view state; otherwise, false.

Remarks

If the editor’s view state is enabled (which is defined by the EnableViewState property), you can use the StoreContentBytesInViewState property to control the editor’s ability to store its binary content in view state between postbacks.

By default, the StoreContentBytesInViewState property is set to false. In this case, the editor’s image content represented by a byte array is not preserved within a view state across HTTP requests (which is performed using the postback technology). And, the editor doesn’t display its image after a postback. To make the editor display its image, you should manually bind the editor (or a container control within whose template the editor resides) to data on each postback.

In order to preserve the editor’s content in a view state between round trips to the server, set the StoreContentBytesInViewState property to true. Note however, that this setting might affect your application performance, because it might lead to a page size increase. Especially, it might take place when an ASPxBinaryImage editor is placed within a list control’s template and cloned several times within a page.

Note

The StoreContentBytesInViewState property synchronizes its value with the editor’s ASPxBinaryImage.StoreContentBytesInViewState property.

See Also