I'm new to the MVC development so please bear with me. Is it really necessary to name my partial view like _Action.cshtml
(with the _
underscore) to comply with the naming convention?
Here's my problem I have a controller (StudentController) and an action (List) that has a partial view file named "List.cshtml", and have
@{ Html.RenderAction("List", "Student"); }
to display this inside my HomeController - Index view as partial view which works. But if I name my partial view to _List.cshtml
of course it will not work. Visual Studio could not even find the view for my action Student - List because it think it's still looking for the exact same name as my action (List.cshtml)
. What should I do?
I m so used to ASP.NET ascx with a pairing ascx.cs code. :(