ASPxObjectContainer Class
An ASPxObjectContainer control.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
NuGet Package: DevExpress.Web
#Declaration
public class ASPxObjectContainer :
ASPxWebControl
#Remarks
The ASPxObjectContainer control allows media data (flash, image, video, audio) to be present on a web page. The source of the media data is specified by the ASPxObjectContainer.ObjectUrl property. By default, the type of media data is automatically defined by the ASPxObjectContainer control. To customize the container object’s settings, use the ASPxObjectContainer.ObjectProperties property.
#Create an ObjectContainer Control
#Design Time
The ASPxObjectContainer control is available on the DX.24.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:ASPxObjectContainer ID="objectContainer" runat="server" ClientInstanceName="ClientObjectContainer"
ObjectUrl="~/ObjectContainer/Files/RatingControl.mp4" ObjectType="Video">
</dx:ASPxObjectContainer>
#Run Time
using DevExpress.Web;
...
protected void Page_Load(object sender, EventArgs e)
{
ASPxObjectContainer objectContainer = new ASPxObjectContainer();
objectContainer.ID = "objectContainer";
Page.Form.Controls.Add(objectContainer);
objectContainer.ClientInstanceName = "ClientObjectContainer";
objectContainer.ObjectUrl = "~/ObjectContainer/Files/RatingControl.mp4";
objectContainer.ObjectType = ObjectType.Video;
}
Note
DevExpress controls require that you register special modules, handlers, and options in the Web.
#Macromedia Shockwave Flash (SWF)
For more information on flash object settings, see FlashObjectProperties.
#Image
The following types of images are supported: BMP, GIF, ICO, JPEG, PNG.
For more information on image object settings, see ImageObjectProperties.
#Video
The following types of video files are supported: ASF, ASX, AVI, MP4, MPE, MPEG, MPG, WM, WMV, WMX, WVX.
For more information on video object settings, see VideoObjectProperties.
#Audio
The following types of audio files are supported: AIF, AIFC, AIFF, AU, M4A, MID, MIDI, MP2, MP3, MPA, RMI, SND, WAV, WAX, WMA.
For more information on audio object settings, see AudioObjectProperties.
Note
The ASPx
- The control’s client-side equivalent is represented by the ASPx
Client object.Object Container - On the client side, the client object can be accessed directly by the name specified via the ASPx
Object property.Container. Client Instance Name - The available client events can be accessed by using the ASPx
Object property.Container. Client Side Events
The control’s client-side API is enabled if the ASPx
Note the ASPx