0

I have a controller that has a metod that returns a View that accepts an object of type "A".

[HttpGet]
public virtual ActionResult FirstMethod(){
 //logics

 return View(MVC.MyController.Views.MyView, objectOfTypeA)
}

Form another action in another controller I am trying to do the same but with a different object. After the

[HttpGet]
public virtual ActionResult SecondMethod(){
  //logics

  return View(MVC.MyController.Views.MyView, model)
}

which is in another controller and another method, nothing happens. The View doesn't change. The URL doesn't redirect at all and stays on the same page. Do you have any idea why is that happening?

tereško
  • 58,060
  • 25
  • 98
  • 150
mathinvalidnik
  • 1,566
  • 10
  • 35
  • 57
  • Perhaps you are looking for [RedirectToAction](http://msdn.microsoft.com/en-us/library/system.web.mvc.controller.redirecttoaction(v=vs.118).aspx)? – asawyer Apr 01 '14 at 13:43
  • @asawyer Do I have to make the redirect just to return the View ? I am trying to escape the "RedirectToAction" because I will have to pass the object through the URL which doesn't sound like a good idea. – mathinvalidnik Apr 01 '14 at 13:47

0 Answers0