I am having a value ["aaa","bbb","ccc"] in column. I have to put each value in separate textbox without double quotes.
I have tried (in view):
<td>@Html.TextBoxFor(m => (m.editPeriodicTask.args[0]), new { @id = "args0", @class = "form-control-list" })</td>
<td>@Html.TextBoxFor(m => (m.editPeriodicTask.args[1]), new { @id = "args1", @class = "form-control-list" })</td>
<td>@Html.TextBoxFor(m => (m.editPeriodicTask.args[2]), new { @id = "args2", @class = "form-control-list" })</td>
and also
<td>@Html.TextBoxFor(m => (m.editPeriodicTask.args.split(',')[0]), new { @id = "args0", @class = "form-control-list" })</td>
<td>@Html.TextBoxFor(m => (m.editPeriodicTask.args.split(',')[1]), new { @id = "args1", @class = "form-control-list" })</td>
<td>@Html.TextBoxFor(m => (m.editPeriodicTask.args.split(',')[2]), new { @id = "args2", @class = "form-control-list" })</td>
but it does not gives the exact solution what i need. How to do this.?
string[]and convert your value to an array using thestring.Split()method and then use aforloop to generate a textbox for each value in the array (side note: you usage of@id = "args"is generating duplicateidattributes which is invalid html)