rsd_17 Posted January 20, 2020 at 11:29 AM Report #617152 Posted January 20, 2020 at 11:29 AM Ola bom dia, estou a tentar fazer um if deforma que dependendo do IAction selecionado me redirecione views diferentes <table> <tr> <td> <a href="~/professor/RegistarProfessor"> Registar como professor </a> @if(click == "Registar como professor") { <a asp-controller="Professor" asp-action="RegistarProfessor"> } </td> <td> <a href="~/socios/RegistarSocio"> Registar como socio </a> @if (click == "Registar como socio") { <a asp-controller="Socio" asp-action="RegistarSocio"> } </td> </tr> </table> Eu tentei fazer assim mas nao funciona, alguem tem ideias de como posso resolver isso ?
rsd_17 Posted January 20, 2020 at 11:36 AM Author Report #617155 Posted January 20, 2020 at 11:36 AM <table> <tr> <td> <a asp-controller="Professor" asp-action="RegistarProfessor" href="~/professor/RegistarProfessor"> Registar como professor </a> </td> <td> <a asp-controller="Socio" asp-action="RegistarSocio" href="~/socios/RegistarSocio"> Registar como socio </a> </td> </tr> </table>
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now