Jquery - Send variables to a controller Action via GET in AJAX

Gonesh2011

New Member
All,I want to send a variable "itemId" via GET to a controller action through AJAX. In the Controller Action, I should be able to retrieve the value using \[code\]$_GET["itemId"];\[/code\]Can I send the querystring with "data" tag instead of appending it to the "url"?I have the following code:\[code\] $.ajax({ type: 'GET', url: "/controller/controlleraction", data: itemId, cache: false, dataType: "html", success: function(html_input) { alert(html_input); } });\[/code\]How can I do this?
 
Back
Top