Back to Devexpress

ASPxImage.ImageUrl Property

aspnet-devexpress-dot-web-dot-aspximage.md

latest5.1 KB
Original Source

ASPxImage.ImageUrl Property

Gets or sets the URL pointing to the image displayed within the ASPxImage.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue("")]
public string ImageUrl { get; set; }
vb
<DefaultValue("")>
Public Property ImageUrl As String

Property Value

TypeDefaultDescription
StringString.Empty

A System.String value specifying the URL representing the path to the image displayed within the ASPxImage.

|

Remarks

Use the ImageUrl property to specify an URL representing the path to the image displayed within the ASPxImage.

All graphic file formats which can be interpreted by internet browsers are supported. The image’s URL can represent either an absolute or relative path.

Example

The complete sample project is available in the DevExpress Code Central database at E1120.

javascript
...
function popupControl_Init(s, e) {
    //Synchronize the client variable's value with the confirm dialog checkbox' setting
    dontAskConfirmation = cbDontAsk.GetChecked();
}

function ShowPopup(rowId) {
    //Assign the row's ID value to a specific label within the confirmation dialog, 
    //show the dialog, and set focus to the Yes button
    lbRowId.SetText(rowId);
    popupControl.Show();
    btnYes.Focus();
}

function btnYes_Click(s, e) {
    ClosePopup(true);
}

function btnNo_Click(s, e) {
    ClosePopup(false);
}

function cbDontAsk_CheckedChanged(s, e){
    //Synchronize the client variable's value with the confirm dialog checkbox' 
    //setting, and focus the Yes button
    dontAskConfirmation = cbDontAsk.GetChecked();
    btnYes.Focus();
}
...
aspx
...
<dxrp:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" Width="300px" 
HeaderText="Delete Confirmation" DefaultButton="btnYes">
     <PanelCollection>
         <dxp:PanelContent runat="server">
            <table>
                <tr>
                    <td rowspan="2">
                      <dxe:ASPxImage ID="ASPxImage1" runat="server" ImageUrl="~/Images/img1.png">
                      </dxe:ASPxImage>
                    </td>

                    <td>
                        <dxe:ASPxLabel ID="ASPxLabel1" runat="server" 
                        Text="Are you sure you want to delete this row?">
                        </dxe:ASPxLabel>
                    </td>
                </tr>
                <tr>
                    <td>
                        <dxe:ASPxLabel ID="ASPxLabel2" runat="server" Text="Row ID: " >
                        </dxe:ASPxLabel>    
                        <dxe:ASPxLabel ID="ASPxLabel3" runat="server" 
                        Text="" ClientInstanceName="lbRowId" Font-Bold="True">
                        </dxe:ASPxLabel>     
                    </td>
                </tr>
            </table>
            
 
            <table>
                <tr>
                    <td>
                        <dxe:ASPxCheckBox ID="cbDontAsk" runat="server" 
                        Text="Don't ask confirmation" ClientInstanceName="cbDontAsk">
                            <ClientSideEvents CheckedChanged="cbDontAsk_CheckedChanged" />
                        </dxe:ASPxCheckBox>
                    </td>

                    <td style="width:100%">
                    </td>

                    <td>
                        <dxe:ASPxButton ID="btnYes" runat="server" Text="Yes" Width="50px" 
                             AutoPostBack="False" ClientInstanceName="btnYes">
                            <ClientSideEvents Click="btnYes_Click" />
                        </dxe:ASPxButton>
                    </td>

                    <td>
                        <dxe:ASPxButton ID="btnNo" runat="server" Text="No" 
                             Width="50px" AutoPostBack="False">
                            <ClientSideEvents Click="btnNo_Click" />
                        </dxe:ASPxButton>
                    </td>
                </tr>
            </table>         
         </dxp:PanelContent>
     </PanelCollection>
 </dxrp:ASPxRoundPanel>

See Also

EmptyImage

Image

ASPxImage Class

ASPxImage Members

DevExpress.Web Namespace