Guest User

Untitled

a guest
Jun 23rd, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. public ContentResult RevertToDefault(int id, string default)
  2. {
  3. /** Update the DB **/
  4.  
  5. return Content(default);
  6. }
  7.  
  8. <%= Ajax.ActionLink(
  9. "Revert",
  10. "RevertToDefault",
  11. new { id = Model.MyObject.ID, default = Model.MyObject.DefaultValue },
  12. new AjaxOptions { OnComplete = "function(r) { alert(r); }" })%>
  13.  
  14. <%= Ajax.ActionLink(
  15. "Revert",
  16. "RevertToDefault",
  17. new { id = Model.MyObject.ID, default = Model.MyObject.DefaultValue },
  18. new AjaxOptions { OnComplete = "function(r) { alert(r.get_data()); }" })%>
Add Comment
Please, Sign In to add comment