I am Passing Parameters to ICICI Payment Gateway but I am getting below error in exception:
Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack
Below is my C# code:
HttpResponse response = HttpContext.Current.Response;
response.Clear();
StringBuilder s = new StringBuilder();
s.Append("<html>");
s.AppendFormat("<body onload='document.forms[\"form\"].submit()'>");
s.AppendFormat("<form name='form' action='{0}' method='post'>", "http://payment.xyz.com/Test.aspx");
s.AppendFormat("<input type='hidden' name='userID' value='" + RegId +" ' />");
s.AppendFormat("<input type='hidden' name='Amount' value='" + lbl_amount.Text + "' />");
s.Append("</form></body></html>");
response.Write(s.ToString());
response.End();
Page is redirecting also into http://payment.xyz.com/Test.aspx and also getting error in this URL:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.