1

I am using BLAZOR Razor Component. I want to use Navigation Manager to transfer data (a JSON string or model data) from the Razor component to the MVC Controller via the POST method.

I have tried

POSTJSONASYNC Method but Navigation Manager Work Seperateltly. My Requirement is to Transfer the data with Navigation Manager in POST Method.

amanpreet
  • 21
  • 5

2 Answers2

0

You can not transfer data(make request) using NavigationManager. You need to use HttpClient to request from blazor to API.

For more understanding you can check here

Kiran Joshi
  • 1,758
  • 2
  • 11
  • 34
0

Simply using a classic <form action="your/controller" method="post"> with a call to form.submit() by javascript could work. Obviously the data will be in formdata, but you could have a hidden field containing your json.

Artur
  • 334
  • 5
  • 15