mikha
asked on
asp.net mvc , views, hidden values ?
consider a scenario below. I have a MVC view, with months of the year listed and checkboxes for weeks in every month. if the users clicks on any checkboxes, i also want to be able to identify, for which month they selected the week for. in my database, i have columns for month and then week. I don't want another checkbox next to each month, for users to click.
so what is a good way to identify and send the month info as well to the controller so that , i can save the value for the month in the database.
do use hidden field for such scenario?
<div id="January">
<input type="checkbox" name="week" value="1"/>
<input type="checkbox" name="week" value="2"/>
</div>
<div id="February">
<input type="checkbox" name="week" value="1"/>
<input type="checkbox" name="week" value="2"/>
</div>
so what is a good way to identify and send the month info as well to the controller so that , i can save the value for the month in the database.
do use hidden field for such scenario?
<div id="January">
<input type="checkbox" name="week" value="1"/>
<input type="checkbox" name="week" value="2"/>
</div>
<div id="February">
<input type="checkbox" name="week" value="1"/>
<input type="checkbox" name="week" value="2"/>
</div>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER