I need to post data to a url and redirect to the same. Presently i am using the code:
using (WebClient client = new WebClient())
{
byte[] response =
client.UploadValues("https://website.com/target.aspx", new NameValueCollection()
{
{ "param1", 1 },
{ "param2", 0 }
});
string result = System.Text.Encoding.UTF8.GetString(response);
}
I am getting html string as response. I need to redirect to the page "https://website.com/target.aspx".