0

I have an attendance system in which the user enters the manual entry for attendance . I dont want to do a single entry and post the form.

The user will enter the Employee ID and then the Date and the time when he attended the office. The the user will press the Add button it will not be added in the database but it will collect the values in input boxes like this

<input type="text" name="EMP_ID" value="">
<input type="text" name="DateTime" value="">
<input type="Submit"  value="Add">

As soon it press the Add button the jquery will append the div box with the form elements
like this

<div class="appendBox">
<input type="text" name="time[emp_id][1][timein]" value="2014-02-02 2:00"/>
<input type="text" name="time[emp_id][1][timeout]" value="2014-02-02 2:00"/>
<input type="text" name="time[emp_id][1][Manual]" value="true"/>
</div>

when all the entries added then the submit button will appear and when submit is pressed it will get the array . I have done this in php ..

I want to achieve this in Asp.net MVC3 .

I want to create a model and fetch the values and insert it in the database

I am confused how to achieve . it

1
  • I don't think a 3 dimensional array is a good solution for this... Commented Jan 13, 2014 at 18:33

1 Answer 1

1

I think this is what you are looking for: model binding to a list

also duplicate of this: Post array in ASP.NET MVC 2 using name="array_name[]" for form elements

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you ... such a relief

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.