Guest User

Untitled

a guest
Apr 21st, 2018
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. $("#myForm").submit(function (event) {
  2. var data = $('#myForm').serialize();
  3. event.preventDefault();
  4. // check if the input is valid
  5. if (!$(this).valid()) return false
  6. $.ajax({
  7. url: '@Url.Action("MyAction", "Home")',
  8. type: 'POST',
  9. cache: false,
  10. data: data,
  11. success: function (result) {
  12. }
  13. }
  14. });
  15. });
  16.  
  17. public ActionResult myAction(myModel model,HttpPostedFileBase File)
  18. {
  19. }
Add Comment
Please, Sign In to add comment