Render MVC PartialView into SignalR response

前端 未结 6 994
抹茶落季
抹茶落季 2020-12-13 04:19

I would like to render a PartialView to an HTML string so I can return it to a SignalR ajax request.

Something like:

SignalR Hub (mySignal

6条回答
  •  自闭症患者
    2020-12-13 04:45

    How about using the RazorEngineHost and RazorTemplateEngine. I found this nice article that might be what you're looking for. It's about hosting Razor outside of ASP.NET (MVC).

提交回复
热议问题