Guest User

Untitled

a guest
Jan 21st, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. //The below code DOES NOT work.
  2.  
  3. function LoadTabContents(applicationID)
  4. {
  5. $("#currentTab").load('@Url.Action("TabMethod", "MyController", new { @id = applicationID })')
  6. }
  7.  
  8. //The below code works fine.
  9.  
  10. function LoadTabContents(applicationID)
  11. {
  12. $("#currentTab").load('@Url.Action("TabMethod", "MyController", new { @id = 123})')
  13. }
  14.  
  15. function LoadTabContents(applicationID) {
  16. $("#currentTab").load('@Url.Action("TabMethod", "MyController")' + '/'+ applicationID);
  17. }
  18.  
  19. public ActionResult Index()
  20. {
  21. if (Request.IsAjaxRequest())
  22.  
  23. return PartialView("partialView");
  24. else
  25. return View();
  26. }
  27.  
  28. $("#currentTab").load('@Url.Action("TabMethod", "MyController", new { @id = "[APPLICATION_ID]"}).replace("[APPLICATION_ID]",applicationID)')
Add Comment
Please, Sign In to add comment