i'm new to asp.net mvc and i'm trying to handle saving and retrieving the checkBox checked values.
In my view i'm having below checkboxes
<input type="checkbox" id="cabling in coduit" name="Prepration" value="cabling in coduit"/>cabling in coduit<br />
<input type="checkbox" id="Power to be done by liteStart" name="Prepration" value="Power to be done by liteStart"/>Power to be done by liteStart<br />
<input type="checkbox" id="Other - pls spec" name="Prepration" value="Other - pls spec"/>Other - pls spec<br />
In my controller:
String vals=Request.Form["Prepration"];
I get the checked values as a comma separated string and i save that string into my database column.
Now when i retrieve the value i have something like below.
cabling in coduit,Power to be done by liteStart
How can i check the relevant checkboxes on my edit view using the comma separated string