Making View Component class as generic in .NET CORE

Viewed 678

I have a view component which as a Jquery datatable in view. I want to make this view component as a generic one. In my project, Most of the requirement is to render the data as Grid. So I want to make this view component to be a generic one. I tried by passing parameter of controller and action method. It worked fine. But that is not accepted by client. So is there any other method to achieve this requirement using view component?

Can anyone answer for below questions

  1. Can we make a view component class as a generic one?
  2. Can we pass the generic type as a parameter in the class in view component?
0 Answers
Related