How i return data in html format in web api??
How i return data in html format in web api??
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vinay SinghPosted Aug 13, 2016, 2:03 AM
Return HTML string
Return string content with media type
text/html:Returning Razor view from Web API
You need to
Install-Package RazorEngineusing your NuGet console.Now we can use code from the previous example to return HTML string from Web API.
Midhun TpPosted Aug 13, 2016, 1:06 AM