Skip to main content

CollapsiblePanelSettings.SetContent(String) Method

Specifies the panel content.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v24.2.dll

Declaration

public void SetContent(
    string content
)

Parameters

Name Type Description
content String

A string value specifying the template content.

Remarks

The SetContent method has an overload that accepts a string as a parameter. You can use this overload to define custom HTML for your panel content, like it is displayed in a code example below.

@Html.DevExpress().Panel(settings =>
{
    settings.Name = "Panel1";
    // Defines panel content as a string with HTML code.
    settings.SetContent(@"<span style=""color:#f00;"">Custom Content</span>");
}).GetHtml()

View Example: Round Panel for ASP.NET MVC - How to define control content

See Also