Reputation: 26936
I have a controller at ~/Controllers/MyController.cs and a view ~/Views/My/V1.ascx . How can I return view V1.ascx in a controller's ReturnV1 method? I tried:
return View("V1");
but it returns an empty response instead of my view.
Upvotes: 0
Views: 1560
Reputation: 96541
Did you mean to use PartialView("V1")
instead of View("V1")
(since the view is called V1.ascx
)?
Or do you have another (empty) view named V1.aspx
in the same folder? In that case, this will have precedence over the ascx View.
Upvotes: 1