SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Post Method Form in C# to a Web Server?

  • 05-10-2007 1:02 PM In reply to

    Re: Post Method Form in C# to a Web Server?

    Use WebClient.UploadString: 

                    using (WebClient webClient = new WebClient()) {
                        string response = webClient.UploadString("http://example.com/page.aspx", "field1=value1&field2=value2");
                    }

     
    If it is your web server, it would probably be better to create a web service that can be consumed by your C# application.

View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.