Skip to main content

ASPxBinaryImage.BinaryStorageMode Property

Gets or sets a value that specifies the storage of binary data.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.1.dll

NuGet Package: DevExpress.Web


public BinaryStorageMode BinaryStorageMode { get; set; }

Property Value

Type Default Description
BinaryStorageMode Default

One of the BinaryStorageMode enumeration values.

Available values:

Name Description

The Cache mode is used if another configuration isn’t defined by the BinaryStorageConfigurator.Mode field.


Binary data is stored within a cache.


Binary data is stored within a session.


Custom mode provides for implementing a custom scenario for storing and accessing binary data.


This property is a wrapper of the BinaryImageEditProperties.BinaryStorageMode property.


View Example

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DevExpress.Web.Internal;

public partial class CacheSample : System.Web.UI.Page {
    protected void Page_Load(object sender, EventArgs e) {

    public void ASPxGridView1_HtmlDataCellPrepared(object sender, DevExpress.Web.ASPxGridViewTableDataCellEventArgs e) {
        if (e.DataColumn.FieldName == "Picture")
            (e.Cell.Controls[0] as BinaryImageDisplayControl).Attributes.Add("data-key", e.KeyValue.ToString());

    protected void ASPxButton1_Click(object sender, EventArgs e) {
        Random rnd = new Random();
        gaugeControl1.Value = rnd.Next(100).ToString();

See Also