Web Browser File Upload Problem
Hi all,
Situation: I have created a very simple .php page which contains:
PHP Code:
<form enctype="multipart/form-data" action="uploader.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000" />
Choose a file to upload:
<input type="file" name="uploadedfile" value="" /><br />
<input type="submit" value="Upload File" />
</form>
Now in my program I want to be able to simply click a button and have it fill in the 'uploadedfile' value to a predetermined file path.
This I thought would be easily done using:
Code:
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
WebBrowser1.Document.Forms.Item(0).GetElementsByTagName("INPUT").Item(1).InnerText=sFilePath
End Sub
However while this code will work on any other type of html element it won't on this one, due to what I'm almost certain is the fact that the type="file" not type="text" or whatever else.
So, I need a way for my program to put a string of text into a 'filebox' (instead of a textbox).
Cheers