Problem solved.
I did not manage with HttpWebRequest, reason being I actually wanted to navigate to the page I was posting to. Maybe I just didn't know what I was doing! LOL
Haven't tried WebClient, only got this reply after I solved my problem.
Found a work-around though:
private void submitForm()
{
System.Web.HttpContext.Current.Response.Write("<form name='newForm' target='_parent' method=post
action='https:// targetUrl'>");
System.Web.HttpContext.Current.Response.Write(string.Format("<input type=hidden name=\"p1\" value=\"{0}\">", p1TerminalID));
System.Web.HttpContext.Current.Response.Write(string.Format("<input type=hidden name=\"p2\" value=\"{0}\">", p2Reference));
System.Web.HttpContext.Current.Response.Write(string.Format("<input type=hidden name=\"p3\" value=\"{0}\">", p3Description));
System.Web.HttpContext.Current.Response.Write(string.Format("<input type=hidden name=\"p4\" value=\"{0}\">",
p4TransactionAmount));
System.Web.HttpContext.Current.Response.Write(string.Format("<input type=hidden name=\"p5\" value=\"{0}\">", p5Currency));
System.Web.HttpContext.Current.Response.Write(string.Format("<input type=hidden name=\"p11\" value=\"{0}\">",
p11ReceiptEmail));
System.Web.HttpContext.Current.Response.Write(string.Format("<input type=hidden name=\"Budget\" value=\"{0}\">",
isBudgetAllowed));
System.Web.HttpContext.Current.Response.Write(string.Format("<input type=hidden name=\"m_1\" value=\"{0}\">", m1BookID));
System.Web.HttpContext.Current.Response.Write("</form>");
System.Web.HttpContext.Current.Response.Write("</body>");
Response.Write("<SCRIPT LANGUAGE='JavaScript'>document.forms[0].submit();</SCRIPT>");
}
Thanks for help though!
Thread Closed
This thread is kinda stale and has been closed but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.