I programmed a lot in C #, but until recently, I havenβt touched many websites. One thing I'm struggling with a bit, and really think there should be a better way that I don't know about, is the correct (several of the best ways?) Way to send data in the form to the server.
I use MVC4 / C #, and I am working on an html form that will consist of at least 18 inputs, and some with several choices and the ability for users to click "add more" in a specific place, and can make the number of input fields 30 + .
Is there any neat way to pack this into some kind of javascript object and get it as an object in C #?
I would prefer not to post to the form, as I want to use AJAX and not refresh the page.
In the only other form that I have done so far in this project, there were about 6 inputs, but each of them was optional. I built queryurl and used jquery. It just seemed more painful than necessary, and it was much less.
$.get(apiLink, function (response) { $("#SearchResults").html(response); });
source share