Passing parameters to a URL through POST


Please help me with the following: in a web form that I have posted to the internet, I am asked to pass 3 parameters to a web form through POST, I never did GET or POST in web form and I am lost of how that is done, then in summary what you would have to do is the following:


Develop a Web Form that through POST receives 3 data (how do I do that)


Develop a client that passes the 3 data through post.

I thank you in advance, thank you.

asked by RSillerico 12.09.2016 в 18:08

1 answer


I understand you have to invoke the url of an aspx, sending values by POST and receive the answer, which would be an html.

If so, you would use the class WebClient

HTTP POSTs and HTTP GETs with WebClient and C # and Faking to PostBack

important analyze how the Method defines

System.Net.WebRequest req = System.Net.WebRequest.Create(URI);

req.Method = "POST";

then define parameters that you send in GetRequestStream()

This way you could create a client that consumes the aspx sending the values by POST

answered by 12.09.2016 / 18:44