1

I would like to submit form by click on the button 'Submit'. All ok, but I have addition checkboxes without binding to model. This checkboxes were added dynamically. How to send form to client with these checkboxes and grab data on server.

1 Answer 1

1

[HttpPost]

public ActionResult Add(PremiumSlots PremiumSlots, FormCollection collection) {

        string chkbx = collection["yes-no"]; 

// "yes-no" name of checkbox (Should be same for all checkboxes)

       // you will get comma separated values, perform split operation on string  and use individualy

}

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

Comments

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.