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: Uploading Files in ASP.net without using the FileUpload server control, 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.

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.