I can't get my request params...
I do a request with ajax by POST method to my services page, in my browser console, the request i well sended like :
localhost/Services/?target=test&action=list&from=test
Send like :
$.ajax({
url: '@Url.Action(Url.Content("../Services"))',
type: 'POST',
data: "target="+$(this).attr('id')+"&action=list&from=test",
dataType: 'string',
success: OnSuccess
});
In my controller, I ve tried :
var context = System.Web.HttpContext.Current;
var q = context.Request.QueryString; //empty
var q2 = context.Request.Url.Query; //empty
// or
var id = Request.QueryString["target"].ToString(); //error - sample on the following link
Get full query string in C# ASP.NET
What s wrong ?