aspnet-devexpress-dot-web.md
Represents an editor capable of displaying images from a binary stream.
Namespace : DevExpress.Web
Assembly : DevExpress.Web.v25.2.dll
NuGet Package : DevExpress.Web
public class ASPxBinaryImage :
ASPxEdit,
IImageEdit,
IBinaryImageEditor
Public Class ASPxBinaryImage
Inherits ASPxEdit
Implements IImageEdit,
IBinaryImageEditor
The ASPxBinaryImage control can be used to display on the web page any valid image (supported by the requesting browser) taken from a binary stream.
The ASPxBinaryImage control is available on the DX.25.2: Common Controls toolbox tab in the Microsoft Visual Studio IDE.
Drag the control onto a form and customize the control’s settings, or paste the control’s markup in the page’s source code.
<dx:ASPxBinaryImage ID="BinaryImage" runat="server" Width="200" Height="200"
ShowLoadingImage="true" LoadingImageUrl="~/Content/Loading.gif" >
<EditingSettings Enabled="true" />
</dx:ASPxBinaryImage>
using DevExpress.Web;
...
protected void Page_Load(object sender, EventArgs e)
{
ASPxBinaryImage binaryImage = new ASPxBinaryImage();
binaryImage.ID = "BinaryImage";
Page.Form.Controls.Add(binaryImage);
binaryImage.Width = 200;
binaryImage.Height = 200;
binaryImage.ShowLoadingImage = true;
binaryImage.LoadingImageUrl = "~/Content/Loading.gif";
binaryImage.EditingSettings.Enabled = true;
}
Imports DevExpress.Web
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim binaryImage As ASPxBinaryImage = New ASPxBinaryImage()
binaryImage.ID = "BinaryImage"
Page.Form.Controls.Add(binaryImage)
binaryImage.Width = 200
binaryImage.Height = 200
binaryImage.ShowLoadingImage = True
binaryImage.LoadingImageUrl = "~/Content/Loading.gif"
binaryImage.EditingSettings.Enabled = True
End Sub
Note
DevExpress controls require that you register special modules, handlers, and options in the Web.config file. You can change this file or switch to the Design tab in the Microsoft Visual Studio IDE to automatically update the Web.config file. Note that this information is automatically registered if you use the DevExpress Template Gallery to create a project.
This class inherits its basic functionality from its ancestor. The ASPxBinaryImage.ContentBytes property provides access to the editor’s contents represented by an array of bytes. The ASPxBinaryImage.StoreContentBytesInViewState property allows you to control whether the editor’s content should be stored within the editor’s view state between postbacks.
Note
Use the ASPxImage control to use the URL path to show an image from the server side.
Show 15 items
Show 12 items
Object Control WebControl ASPxWebControlBase ASPxWebControl ASPxDataWebControlBase ASPxDataWebControl ASPxEditBase ASPxEdit ASPxBinaryImage BootstrapBinaryImage
See Also