0

I am new at using ajax, I have to add the form data onto a post so that it can be added to the server. but the tricky part is that the form data is a partial view on a dialog box. i would like to know how i would be able to use ajax in order to get a hold of this data so that it can be put back on to a database.

Satpal
  • 132,252
  • 13
  • 159
  • 168
user2169717
  • 113
  • 2
  • 3
  • 9

1 Answers1

1

make a function on click of a button in the dilog box Then un that function use $.Post({"Controller/Action", {Parameter List}}) where PArameter List will contain the values of controls Like

Parameter1=document.getelementbyid('Textbox1').value; so on ....

and make a action method in controller using [HTTPPost]

you can check syntax from here

http://www.codeproject.com/Articles/426765/post-and-get-in-MVC-Razor-JQuery

Please Click the answer as useful if it serves your problem.

Prince
  • 308
  • 1
  • 2
  • 11