Home > DeveloperSection > Forums > How to redirect a user control to the view its called from?
Pravesh Singh

Total Post:412

Posted on    August-22-2014 1:37 AM


 1 Reply(s)
 969  View(s)
Rate this:

I have a user control that creates a new record in a database. After it creates the new record, I would like to redirect it back to the view its from. The purpose of this is to refresh the view so that it can show the newly created record. The problem is that user control can exists in more than one view, so how can i know which view is the user control from? so that I can achieve the above scenario? Thanks

Sumit Kesarwani

Total Post:378

Posted on    August-22-2014 2:05 AM

Hi Pravesh, 
try this:

public ActionResult Save(SomeModel model)



   return RedirectToAction("Index");


Don't want to miss updates? Please click the below button!

Follow MindStick