Reputation: 127
I have MVC project, which uses some Blazor pages. What I need now is to pass data back from Blazor page to MVC controller. Is that even possible? My solution is to write data to the DB and get them after in MVC...but I don't like this way. Someone knows a better solution?
Thanks.
Upvotes: 5
Views: 6338
Reputation: 14555
There is no built-in functionality for this, you need to use an HTTP client, such as HttpClient
. See an example on the Microsoft documentation site here: https://learn.microsoft.com/en-us/aspnet/core/blazor/call-web-api?view=aspnetcore-3.1.
Upvotes: 2