views:

61

answers:

1

I need to upload a file from the client to an asp.net page. The source page is not able to use the server side controls. Is this possible?

I have seen this question: http://stackoverflow.com/questions/569565, however this is using a standard input file control but a server side button. In my case I can't use a server side button.

Essentially my source page has two forms, and the second form is a non-server side form. When the user clicks a button we do a post to a new page, which is launched in a new window. I need to send the file over there.

When I use all client side controls, I am not seeing the file contents on the server.

+2  A: 

This could be because you need to set the form to a multi-part form type. Try adding the enctype="multipart/form-data" to the client side form.

David McEwing
Well that seemed to do it, thanks, having one of those controls be a server side control must change that enctype.
JoshBerke