Hi,
Thanks for your response.
Sorry I was not clear before. The above code is my AIM request and not my Silent Post handler. The code should look more like this.
sub Page_Load()
{
.....
bool success = processAIM(); //returns true if transaction is approved, otherwise false.
if (success)
{
showUserPage("thank_you");
}
else
{
showUserPage("error");
}
}
The processAIM() returns a successful result. My question is how to implement the showUserPage(). I can either to a Response.Redirect(page). Or I can write html that will have javascript request that page:
void showUserPage(string page)
{
Response.Redirect(page);
}
---Or---
void showUserPage(string page)
{
Response.Write(<html><head><script>window.location= [page]</script></head><body></body></html>)
Response.End(); // I must call end because I only want this html to be returned to the user.
}
Using both of these implementations, the user can see my thank_you_page. Which of the showUserPage() implementations is better? According to the link above, I should be using the second method, but I don't see how this will affect my silent post request body. Is Response.End() a problem? And if so, they why?
As a side note, I am also testing ARB which also use Silent Post. I also sporadically get empty Silent Posts request bodies. Am I doing something wrong in general in regards to setting up silent posts?
Thanks