How to upload file using POST method using WebBrowser RRS feed

  • Question

  • Hi everybody. At first, I want to say that I'm not that good in VB.NET and can't understand ASP.NET, so it's just a simple VB.NET application.

    I started one interesting project - testing (certification) application. User logs in, gets tests which are available to him and submit his results to server. I was too lazy to implement server-side, so, I decided to do this in the following crazy way:

    My "server" is represented by several PHP-files. For example, I have "UserHasAccessToTest.php" which echoes "YES" or "NO" if user has access (without HTML tags, just plain text). So, my client application requests (using System.Net.WebRequest) "UserHasAccessToTest.php?login=dokz&testid=11". Then System.Net.WebResponse outputs it to Stream and application checks if it is "YES" or "NO".

    The first question is "Is is a bad way to program server 'application' and I need to do it in proper way or it is ok?"

    The second question: I got one problem. I need to upload results of test to the server. Now, it's like "uploadanswers.php?login=dokz&answers=ABACADA" etc, but it's not ok because I'm gonna add a "open questions" function (not sure, how it's in English. when you write answer by yourself without variants). Suppose, that we don't have FTP. I have created php-page with standard post file upload form. And now I create a hidden VB form with WebBrowser component which opens that URL. How to fill in "file path" input and click "Upload"? That's the second question.

    Thank you in advance.

    • Moved by Youen Zen Friday, July 19, 2013 8:29 AM
    Tuesday, July 9, 2013 4:34 PM

All replies