-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code sample on .NET HTML Client on rendering adaptive card #88
Comments
You could call the renderer API from a Razor View if you want to inject the HTML in it. I don't have a code sample but it should be relatively straight forward using Razor's docs to call APIs Please see here for a C# sample: https://docs.microsoft.com/en-us/adaptive-cards/sdk/rendering-cards/net-html/render-a-card Please let us know if that doesn't answer your question |
This documentation shows how to create the html in the c# class but not how to display it on the page. The Razor documentation is not helpful either. Just adding the razor page to this example in the documentation would be extremely helpful. Edit: Update on previous comment - code example What is missing between creating the
|
@PeggyWiltz I believe you need to wrap this line: @renderedCard.Html In the raw HTML helper that Razor provides as follows: @Html.Raw(renderedCard.Html) You can review the docs for this method here: https://docs.microsoft.com/en-us/dotnet/api/system.web.mvc.htmlhelper.raw?view=aspnet-mvc-5.2 |
Would .NET HTML rendering also apply to Razor page of MVC?
Would it be possible to provide a code sample on .NET HTML client to demonstrate how the adaptive card be rendered? Thanks.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: