I have a website that uses jQuery AJAX. Using this jquery code
$.post("/ajax/getsomedata.aspx", {'id': id }, function(data) { dosomething(data); } );
When I run this with cookieless = "false" , the id is displayed 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 save the data and avoid automatic redirection. I exclude ** Diago ((and delete my because its links give some idea of ββwhat is going on. I like the idea of ββa separate domain, but I cannot do it here.
Here's the updated code:
$.post("<%=Response.ApplyAppPathModifier("/ajax/getsomedata.aspx")%>", {'id': id }, function(data) { dosomething(data); } );
According to MSDN, Response.ApplyAppPathModifier () adds a session identifier if you are in a state without a cookie session, and returns an immutable URL if you did not.
Since there is no session identifier, ASP.NET creates a new session and performs a redirect (thus deleting any form data).
jrcs3
source share