2

I am using Asp.Net MVC4 .I have my HomeController in my root Controller folder. and my view is in some different folder(~/Folder1/FolderB/View1.cshtml)

How can i access my view from HomeController.

2
  • What you have tried? Commented Nov 20, 2016 at 8:10
  • Please note that the model-view-controller tag is for questions about the pattern. There is a specific tag for the ASP.NET-MVC implementation. Commented Nov 20, 2016 at 8:17

1 Answer 1

3

Check Below Solution :

public ActionResult TestAction()
{
  // You can access view from any folder
  return View("~/Folder1/FolderB/View1.cshtml");
}

Hope This will help !!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.