Methods ActionResult Asp.net MVC

1

If I create a method of type ActionResult with any name and give a return to a View I want to return something, will it work normally or need to have the same name of View ?

public ActionResult RetornarIRPJ(string Tipo)
{
       BoletoRepositorio br = new BoletoRepositorio();
       BoletoModel bm = new BoletoModel();

          bm.IRPJ = br.IRPJ(Tipo).ToString();

          return View("Detalhes");
}
    
asked by anonymous 12.08.2015 / 14:45

1 answer

2

Yes, it will work, you only have to enter the name of the view:

public ActionResult GoToView()  
{
    return View("frmProdutos");
}
    
12.08.2015 / 15:08