[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

JQuery Parent/child form. how to Post to MVC Controller

Posted on 2010-04-06
1
Medium Priority
?
1,173 Views
Last Modified: 2013-11-08
This project is a booking calendar for a Spa.

I have a calendar on the Booking page. When the user clicks the calendar, a JQuery dialog is displayed with booking info.

The end user will here enter one or more treatments before they enter any information about the Customer. Since I don't know if this is a return or new customer, I don't want to save to the DB at this point so I put the information in a table in the dialog.

When the user press the OK-button, I'd like to save the information to the server. There are several form fields and off course the table with the information. How do I pass the data to the server with an AJAX call? If I use a Form Post, the data in the table will not be passed.

Any help is appreciated.

Best Regards

Tomas


0
Comment
Question by:ekenman
1 Comment
 

Accepted Solution

by:
ekenman earned 0 total points
ID: 30005665
I ended up with several AJAX calls to solve this.
First I add the parent record and then each child-record in separate ajax posts sending each field and specifying them in the controller.
I found some solutions to passing json to the controller in c# using model binders, but could not get them to work in VB.
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question