Hello,
I have two project in one solution, I have an action in first project
[Route("[controller]/[action]")]
public class HomeController : Controller
{
[HttpGet]
public string Index()
{
return "Hi";
}
}I tried this in second project , but its not working.
Note: By the way, I did dependecy
$.ajax({
url: 'https://localhost:xxx/Home/Index',
type: 'get',
dataType: 'json',
contentType: 'application/json;charset=utf-8',
success: function (data) {
alert('Success: ' + data);
},
error: function (error) {
alert(error.statusText);
}
});