Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Change this
public class EventListingPageController : GenericListingPageController
to =>
public class EventListingPageController : ContentPageControllerBase<EventListingPage>
?
Hi! I have a listing page called GenericListingPage. I also have another listing page called EventListingPage, which inherits from GenericListingPage.
Also, the controller for EventListingPage inherits from the GenericListingPage's controller.
If I go to any of these pages I get an ambiguous call on the index method. I understand why, but not sure how to solve.
The first code snippet shows the top of the GenericListingPageController, the second shows the EventListingPageController:
[TemplateDescriptor(ModelType = typeof(GenericListingPage), Inherited = false)] public class GenericListingPageController : ContentPageControllerBase
{
public ActionResult Index(GenericListingPage currentPage, int page = 1)
[TemplateDescriptor(ModelType = typeof(EventListingPage))] public class EventListingPageController : GenericListingPageController { public ActionResult Index(EventListingPage currentPage, int page = 1) {
Does anyone know any solution for this scenario? Thanks in advance!