I want to be able to make the below code dynamic so it can be reused and in place of filterTaskList and TaskListId i want to use string variables. I believe its done using reflection (i could be wrong) can anyone help?
foreach (var x in Model.filterTaskList)
{
CbTaskListIds = CbTaskListIds + "<tr><input type=\"checkbox\" class=\"filtercheckbox\" onclick=\"checkFilterAll('" + x.TaskListId + "')\" name=\"" + x.TaskListId + "\" value=\"" + x.TaskListId + "\">" + x.TaskListId + "</input></tr>";
}

New Topic/Question
Reply



MultiQuote





|