Hello,
On a view I am creating List Items on an Unordered list, using JQuery, which is inside a form. Each item is as follows:
<form ...
<ul>
<li>Book<input type="hidden" value="Book" name="Themes"/></li>
<li>Video<input type="hidden" value="Video" name="Themes"/></li>
...
</form>
The inputs are created so the values Book and Video can be created on the controller.
On the controller I am able to get the values of all form elements but when I try to get the values of Themes using:
string[] themes = new string[] {};
UpdateModel(themes, new[] { "Themes" });
I get the following error, on code line 2:
"Value cannot be null or empty."
I tried everything I could think of but no luck.
Could someone please help me out?
Thanks,
Miguel