Syntax . cshtml - Devexpress

Asked

Viewed 48 times

0

On the page .aspx, have a Aspxrichedit and at 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" %>

Works normal. The component appears on the screen.

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

1 answer

0


Lucas, read the documentation of the component you are implementing.

In your view:

 @Html.Partial("RichEditPartial")

Create Partial 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:

https://documentation.devexpress.com/AspNet/114046/ASP-NET-MVC-Extensions/Rich-Text-Editor/Overview/Overview-Rich-Text-Editor

  • @lucaswmolin, you made it?

  • No. There were some mistakes that I’m solving, but when I solve one comes another...

  • Done! I was able to understand better with this video: https://www.youtube.com/watch?v=BdO07KuPGqM

Browser other questions tagged

You are not signed in. Login or sign up in order to post.