Abhijeet Panpatil

Abhijeet Panpatil

  • NA
  • 95
  • 20.7k

call api using c#, MVC and print result in html page.

Mar 30 2018 9:26 PM
We have deployed api and api is working correctoly but the problem is when im click to button it rediretcs me to that api url and on that page it returns me "success" message.But i want to display that message inside html page without any redirection. I have created a web application using c#, MVC .Please help me regarding this.
My code to call api is as follows:-
 
<div class="row">
<div class="col-md-12">
<div style="padding:10px"><center><button type="button" style="width:80%; font-size:25px;" class="btn btn-danger" onclick="location.href='http://127.0.0.1:5000/'">Sync Movies</button></center></div>
</div>
</div
 

Answers (1)