Jump to content

Ciclo if que redeciona views diferentes


Recommended Posts

Ola bom dia,

estou a tentar fazer um if deforma que dependendo do IAction selecionado me redirecione views diferentes 

            <a href="~/professor/RegistarProfessor">  Registar como professor </a>
            @if(click == "Registar como professor")
              <a asp-controller="Professor" asp-action="RegistarProfessor">
            <a href="~/socios/RegistarSocio"> Registar como socio </a>
            @if (click == "Registar como socio")
              <a asp-controller="Socio" asp-action="RegistarSocio">

Eu tentei fazer assim mas nao funciona, alguem tem ideias de como posso resolver isso ?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.