Ques : I want Post Or Execute on my page and Get Response on my same page which page i had posted without redirecting or going on another page.
I had created a dynamic web form.
<form id="PostForm" name="PostForm" action="https://merchant.PaymentGateway.com/thirdparties/doubleverification.htm" method="POST">
<input type="hidden" name="merchant_code" value="XYZ">
<input type="hidden" name="encdata" value="+yw5GSwy5ns7XP0/XYZ/6YEkdfjs fjvnsdr+cecGpm0kwhgopO3Jc9RHTld+sj7h6EKm5tcFGN8/oc5yG9E2JfXeboxlkw31bkrD4fXFr0=">
</form>
i like to post Request and get response this piece of HTML Code using C# without redirecting on Another Page.
I was try to use this below mentioned code but its not working values for Query string.
public bool SendSMS(string mobileNo, string message)
{
try
{
string strUrl = "https://merchant.PaymentGateway.com/thirdparties/doubleverification.htm.......... SO On...";
WebRequest request = HttpWebRequest.Create(strUrl);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream s = response.GetResponseStream();
StreamReader readStream = new StreamReader(s);
string dataString = readStream.ReadToEnd();
response.Close();
s.Close();
readStream.Close();
return true;
}
catch (Exception)
{
return false;
}
}
They have require Values in only Form as above mentioned with Post Method Please suggest ASAP.