Below code work fine in .Net, now I upgrade my website to dot Net Core 3.1 "HttpContext.Current.Response not supporting in Net Core 3.1"
Whats the alternate solution in Dot Net Core 3.1 ?
Please gives the solution with sample code.
Thanks
string checksum2 = Generate_MerchantRequest_Check_SumNetConnect(secretKey, merchantId, orderNo, amount, date, time);
StringBuilder sb = new StringBuilder();
sb.AppendLine("<html>");
sb.AppendLine(String.Format("<body onload='document.forms[\"{0}\"].submit()'>", "Form1"));
sb.AppendLine(String.Format("<form id='{0}' method='POST' action='{1}'>", "www.smmotors.org Form", urlNetConnect));
sb.AppendLine("<input type='hidden' name='MERCHANT_ID' value='" + merchantId + "' />");
sb.AppendLine("<input type='hidden' name='Order_No' value='" + orderNo + "' />");
sb.AppendLine("<input type='hidden' name='Order_Amount' value='" + amount + "' />");
sb.AppendLine("<input type='hidden' name='Date' value='" + date + "' />");
sb.AppendLine("<input type='hidden' name='Time' value='" + time + "' />");
sb.AppendLine("<input type='hidden' name='CheckSum' value='" + checksum2 + "' />");
sb.AppendLine("<input type='hidden' name='Transaction_Desc' value='" + transactionDesc + "' />");
sb.AppendLine("</form></body></html>");
try
{
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Write(sb.ToString());
HttpContext.Current.Response.End();
_webHelper.IsPostBeingDone = true;
}
catch (Exception ep)
{
throw new Exception(ep.Message);
}