Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Member
29 Points
223 Posts
May 01, 2010 07:27 PM|LINK
I got this actionresult which I want to call with ajax:
public ActionResult TestAction(string id) { ViewData["test"] = id; return View(); }
and the call I do is:
$.get('/Test/TestAction', { 'id': 'sfsfsfsf' }, function(data) { $('#feedbackForm').html(data); }, 'html');
Nyla Pareska
Member
29 Points
223 Posts
Problem with retrieving input parameter
May 01, 2010 07:27 PM|LINK
I got this actionresult which I want to call with ajax:
public ActionResult TestAction(string id) { ViewData["test"] = id; return View(); }and the call I do is:
$.get('/Test/TestAction', { 'id': 'sfsfsfsf' }, function(data) { $('#feedbackForm').html(data); }, 'html');but the input parameter id in the action is always emty. How come? I get into the action without a problem but the input parameter is emtpy. Please explain to me why and what a workaround is with $.get.