I need to create a custom @Html.Partial() method.
Use Case
I have a .cshtml page where in I have multple sections like below
<!-- EDUCATION -->
@Html.Partial("Templates/Create/Modules/Education")
<!-- JOBS -->
@Html.Partial("Templates/Create/Modules/Jobs")
I want to be able to create a custom .Partial() method. Something on the likes of this
@Html.CustomPartial("Templates/Create/Modules/Jobs", "jobs", "edit")
where in the last two parameters are module id and action type id respectively. Using these values I will make a decision in my CustomPartial what I need to show in the output.
I am not sure how to go about this one. Please advice.
Or if someone can point me to the source code of the Html.Partial that too would be very helpful.