Skip to main content

Use Markup to Specify Content

Certain DevExtreme widgets and their ASP.NET Core wrappers (see the list below) allow you to specify content directly in markup.

For example, you can specify content for the DevExtreme Popup widget as follows:

<div id="my-popup">
    <p>Popup content</p>
</div>

To specify content for the ASP.NET Core Popup control, use the @<text> block in a control’s Content method:

@(Html.DevExtreme().Popup()
    .Content(@<text>
        <p>Popup content</p>
    </text>)
)

Note

The Content method is not the same as template methods - HTML content is injected to a control as is and does not support template features like ERB-style constructs.

Control List

You can use markup to define the following controls’ content: