how to pass data from View to Controller using ajax get or post in mvc with parameters
问题 I am trying to pass data from View to Controller Action Method using ajax as follows:- I have Membership instance of user which I passed in from another controller to this view below using viewbag somewhat like this ViewBag.MyUser = MyUser; Now I want to pass 'MyUser' to another Controller form this view using ajax as below. $('#Link').click(function () { $.ajax({ url: http://localhost/Account/Process, type: 'POST', data: '@ViewBag.MyUser', success: function () { }, error: function () { } });