Last post May 26, 2020 01:11 PM by Mikesdotnetting
Member
3 Points
5 Posts
Dec 05, 2019 10:34 AM|johnbalj|LINK
What's the equivalent of using asp.net page response in Blazor ?
such :
Response.Clear(); Response.ContentType = "application/text; charset=utf-8"; Response.Write("SOME TEXT"); Response.End();
All-Star
194490 Points
28079 Posts
Moderator
May 26, 2020 01:11 PM|Mikesdotnetting|LINK
Blazor runs on the client. It doesn't has a Response object. That belongs to code on the server. You should use a Web API endpoint to serve non-html content. Then you can use a standard link to navigate to the URL of the endpoint.
Member
3 Points
5 Posts
Page Response
Dec 05, 2019 10:34 AM|johnbalj|LINK
What's the equivalent of using asp.net page response in Blazor ?
such :
Response.Clear();
Response.ContentType = "application/text; charset=utf-8";
Response.Write("SOME TEXT");
Response.End();
All-Star
194490 Points
28079 Posts
Moderator
Re: Page Response
May 26, 2020 01:11 PM|Mikesdotnetting|LINK
Blazor runs on the client. It doesn't has a Response object. That belongs to code on the server. You should use a Web API endpoint to serve non-html content. Then you can use a standard link to navigate to the URL of the endpoint.