i am having my views separated under subfolder, i have only one Action method in controller, i have my view names in the database, when i call the action method by passing the parameter (for instance: id = 1), it will fetch the view name from the database and the respective view will be load.
public ActionResult Index(int FormId)
{
var getViews = db.fetchViews.where id = 1; //get views from db
return view(getviews.viewName);
}
This is my views in the solution.
while i call the view from action method it says unable to find the views.
i cannot hardcode the subfolder in the Action method like this,
return View("~/Views/Form/Customer1/getviews.viewName");
any ideas would be appreciate...