0

Now I have page A submit (post method) to page B I want to create api at middle between page A and B for track some value to DB from page A

page A submit form---> new c# web api ---> page B

How I can ? pls suggest me .

I try follow this link But not work How to make HTTP POST web request

Nut Fergie
  • 89
  • 1
  • 3
  • 7
  • are you using jquery or anyother frontend javascript framework for ajax post? can you show your code how you doing? – Nomi Ali Jan 29 '20 at 10:23
  • Check below links - https://stackoverflow.com/questions/11324711/redirect-from-asp-net-web-api-post-action[enter link description here](https://stackoverflow.com/questions/11324711/redirect-from-asp-net-web-api-post-action) – Ritesh Kulkarni Jan 29 '20 at 10:25
  • Please show us your code so we can better understand your scenario. – Rahul Sharma Jan 29 '20 at 11:29
  • My original code of page A is below
    ....
    I want change action="pageB" to action="net core web api page " then api redirect to pageB I want create api as middlepage , don't create front page (html JS) as middlepage Can I do ?
    – Nut Fergie Jan 29 '20 at 13:52
  • `page A submit form---> new c# web api ---> page B` You can try to make your API controller action return [Redirect("url")](https://learn.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.controllerbase.redirect?view=aspnetcore-3.1), like [this](https://i.stack.imgur.com/R8ft0.png). – Fei Han Jan 30 '20 at 08:08
  • How post variable from page A via Redirect(url) to page B – Nut Fergie Feb 02 '20 at 02:28

0 Answers0