ASPxImageBase.AlternateText Property
Gets or sets the alternate text displayed instead of the image when the image is unavailable.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
String | String.Empty | A String value that specifies the alternate text displayed instead of the image. |
Remarks
This property is a wrapper of the ImageEditPropertiesBase.AlternateText property.
Example
protected void ASPxCallback1_Callback(object source,
DevExpress.Web.CallbackEventArgs e) {
string xpath = string.Format("//items/item[@id='{0}']", e.Parameter);
XmlNode node = XmlDataSource2.GetXmlDocument().SelectSingleNode(xpath);
if(node != null) {
LargeImage.ImageUrl = "Images/" + node.Attributes["FileName"].Value;
LargeImage.AlternateText = node.Attributes["Text"].Value;
LargeImageText.Text = node.Attributes["Text"].Value;
}
e.Result = ASPxCallback.GetRenderResult(ImagePanel);
}
<asp:Panel ID="Panel1" runat="server" EnableViewState="false" Visible="false">
<asp:Panel ID="ImagePanel" runat="server" >
<dx:ASPxImage ID="LargeImage" runat="server" Height="240px" Width="320px" />
<br/>
<dx:ASPxLabel ID="LargeImageText" runat="server" Text="" />
</asp:Panel>
</asp:Panel>
See Also