Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using html post to upload file

Status
Not open for further replies.

tyreejp

Programmer
Apr 20, 2005
114
US
I have two web pages. Page A has an old school form to post a file to another page. Code:
Code:
<form id="form1" action="WebForm1.aspx" method="post" enctype="multipart/form-data">
    <input type="file" id="Upload" />
    <input type="submit" id="submit" value="send" />       
</form>
Problem is, the receiving side's code behind doesn't ever see that a file was posted. Code:
Code:
For Each f In Request.Files.AllKeys
  <Do something with f>
Next f
However, if I change things on the first page and use the WebClient.UploadFile method, the receiving page does seethe file in its collection.

Does anyone know why?!?

James
--


--
James
 
Probably something more suited for the server-side people to answer I think. Maybe try the ASP fora?

forum333
forum855

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
lol... they gave up and sent me here. Thanks anyway!

--
James
 
Perhaps if you gave your file input a name so it can be used by your ASP script. Other than that it seems a handling problem in the ASP side.

Perhaps this can help:




----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top