1. mathews rutto
  2. PowerServer
  3. Sunday, 5 March 2023 14:57 PM UTC

Hi,

How do i load HTML page in web asp.net core application using SnapDevelop.

Thank you in advance.

Francisco Martinez @Appeon Accepted Answer Pending Moderation
  1. Monday, 6 March 2023 15:04 PM UTC
  2. PowerServer
  3. # 1

Hi Matthews,

What exactly are you trying to achieve? Load an HTML file into memory? Edit an HTML file? Respond to a request with an HTML?
Currently, SnapDevelop cannot do visual editing, so if you want to work with HTML files from inside SnapDevelop, it would have to be code-only.

Regards,
Francisco

Comment
  1. mathews rutto
  2. Tuesday, 7 March 2023 06:53 AM UTC
What i want to archive is load html page from snapdevelop from a folder or directory responding to an api call.
  1. Helpful
  1. Francisco Martinez @Appeon
  2. Tuesday, 7 March 2023 14:20 PM UTC
In that case, you can use this to load said HTML into a string: https://learn.microsoft.com/en-us/dotnet/api/system.io.file.readalltext?view=net-7.0

And see this article on how to return that string as an HTML: https://code-maze.com/aspnetcore-webapi-return-html/



Hope this helps!

Regards - Francisco
  1. Helpful 2
  1. mathews rutto
  2. Tuesday, 14 March 2023 06:56 AM UTC
Thank
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.