I have a web site that uses JQuery AJAX. With this JQuery code
$.post("/ajax/getsomedata.aspx", {'id': id },
function(data)
{
dosomething(data);
}
);
When I run this with cookieless="false", id shows up in Request.Form. When I set cookieless="true", id is no longer in Request.Form.
UPDATE, What I did
I added a call to Response.ApplyAppPathModifier() to preserve the data and avoid an automatic redirect. I am excepting **Diago(( and deleting my own because his references give some insite into what's going on. I like to idea of the seperate domain, but I can't do that here.
Here's the updated code:
$.post("<%=Response.ApplyAppPathModifier("/ajax/getsomedata.aspx")%>",
{'id': id },
function(data)
{
dosomething(data);
}
);
According to MSDN Response.ApplyAppPathModifier() adds the session id if you are in cookieless session state, and returns the unaltered URL if you are not.
Since there is no session id, ASP.NET creates a new session and does a redirect (thus stripping off any form data).