Tab

ASPxBinaryImage.BinaryStorageMode Property

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

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll

Declaration

[DefaultValue(BinaryStorageMode.Default)]
public BinaryStorageMode BinaryStorageMode { get; set; }

Property Value

Type Default Description
BinaryStorageMode

Default

One of the BinaryStorageMode enumeration values.

Available values:

Name Description
Default

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

Cache

Binary data is stored within a cache.

Session

Binary data is stored within a session.

Custom

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

Remarks

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

Example

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();
    }

}