I'm trying to generate a link to another controller, I was only able to create to the same controller.
This works in the same controller
string uri = Url.Link("T", new { token = "token" });
[Route("Taa", Name = "T")]
public IActionResult SomeMethod(string token)
{
return Ok();
}
I tried :
Url.Link("Default", new { Controller = "Account", Action = "Login" });
Url.Route("Default", new { Controller = "Account", Action = "Login" }); (Route Does not exist)
The real Controller and Action are : Validation and Validate
[HttpGet("validate", Name = "Validate")]
public IActionResult ValidateNewUser(string token)
{
return Ok();
}