I'm working on an asp.net mvc project, I have a request to render html controls dynamically based on the data type from db,
for example:
i have 2 record in db;
id | type | value
===========================
1 | charactor | 1
2 | number | 2
in the html side, i want generate these 2 controls differently, for the first record i want to generate as input text, and the second record i want to generate as dropdownlist,
so my solution is create 2 partial views, and based on the type, i will use "renderpartial" to render different partials.
i like to know if there is any better solutions than this one? i found this solution caused slow performance.