0

I use very simple way to post data from my desktop application to my website, like this one:

private void button4_Click(object sender, EventArgs e)
{
   webBrowser1.Navigate("http://mywebsite.com?myvariable=" + myurlstringdata);
}

BUT, i face a problem when my url string is very long with too many querystring items when i'm filling in a form for instance. NOW, i'm wondering if there is a better way for that (to post not using question string as it is in html form <form action="website" method="get">, but using <form action="website" method="post">)

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
user2851996
  • 77
  • 1
  • 4
  • 1
    have a look at this answer http://stackoverflow.com/a/26881/395890 – AMember Oct 07 '13 at 17:48
  • Depends on the website... If you have a db that accepts external access, you can connect directly and manipulate the data as if it was on the same computer. – walther Oct 07 '13 at 17:48
  • 1
    @AMember: That won't display it in a browser. – SLaks Oct 07 '13 at 17:48
  • If you have control over the server side of the application, you should use a web service instead of doing that. – Geeky Guy Oct 07 '13 at 17:57
  • @Renan, can you please give me a link to an example for that. – user2851996 Oct 07 '13 at 18:03
  • @user2851996 you can start [here](http://msdn.microsoft.com/en-us/library/t745kdsh(v=vs.90).aspx). A web service is basically like any regular ASP.NET page, but it works by exchanging XML data with clients instead of serving pages. Think of them as ASP.NET pages meant for machines instead of humans. The nice thing about .NET is that you just add a reference to the web-service in your windows app, and Visual Studio will automatically create proxy classes for each class your web-service exposes in its XML definition - so it's as if, in your forms app, you were actually inside the server. – Geeky Guy Oct 07 '13 at 19:08

0 Answers0