Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. $('#myTable').on('click', 'td', function () {
  2. var serial = table.cell(this).data();
  3.  
  4.  
  5. var form = $('<form action="@Url.Action("status")" id="hiddenform"><input type="hidden" id="serial" name="serial" value=""></form>').appendTo('body');
  6. $('#serial').val(serial);
  7. form.submit();
  8.  
  9.  
  10. });
  11.  
  12. //Accept GET and POST
  13. [AcceptVerbs(HttpVerbs.Get | HttpVerbs.Post)]
  14. public ActionResult Status(System.Web.Mvc.FormCollection collection)
  15. {
  16. string serial = collection["serial"];
  17.  
  18. if (serial == null || serial == "")
  19. System.Windows.Forms.MessageBox.Show("Error: Serial is NULL");
  20.  
  21. return View(serial);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement