Syntax .cshtml - DevExpress

0

In the .aspx page, I have an ASPxRichEdit and the top of the code I place:

<%@ Register Assembly="DevExpress.Web.ASPxRichEdit.v17.2, Version=17.2.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web.ASPxRichEdit" TagPrefix="dx" %>

It works normal. The component appears on the screen.

Now I need to put the same component on a .cshtml page, but with the above code it did not work. What would be the syntax for .cshtml ? In the DevExpress documentation, it only appears for .aspx .

    
asked by anonymous 26.03.2018 / 15:32

1 answer

1

Luke, read the documentation for the component you are implementing.

In your view:

 @Html.Partial("RichEditPartial")

Create the Partial View view for the component:

  @Html.DevExpress().RichEdit(settings => {
        settings.Name = "RichEdit";
        settings.CallbackRouteValues = new { Controller = "Home", Action = "RichEditPartial" };
        }).Open(Server.MapPath("~/App_Data/Documents/Overview.rtf")).GetHtml()

And add Action to your Controller:

public ActionResult RichEditPartial(){
    return PartialView("RichEditPartial");
}

Source:

a>

    
26.03.2018 / 16:09