Link to home
Start Free TrialLog in
Avatar of sl1nger
sl1nger

asked on

How to change content type or enctype?

I have an upload that takes place in one form; enctype: file-data.  After this upload, a result set is listed on the page w/ an option to remove results.  My "remove" results uses a different form than the upload and also requires a different enctype, normal.  How do I get my remove option to work after I've uploaded an item?
Avatar of sl1nger
sl1nger

ASKER

form name="frmMain" enctype="multipart/file-data"
form name="frmRemove" enctype="application/x-www-form-urlencoded"

The page is set to multipart after the upload and so, I can't submit values like I normally would for frmRemove...
ASKER CERTIFIED SOLUTION
Avatar of mk_b
mk_b
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sl1nger

ASKER

Is there a way to just change it on the submit?
Avatar of sl1nger

ASKER

Now, I'm thinking it may be better for one form that changes enctypes depending on the submit button pushed.  Since, I would now I have two different actions.  ok.. so, how would I write one form w/ 2 submit.

<form name=frmOne enctype=if submitOne then "file-data" else "www">
<input type=submit name="submitOne" value="upload">
<input type=submit name="submitTwo" value="remove">


How would I write this?  Do you think it'll work?

i would still recomend what i have above???
Avatar of sl1nger

ASKER

you may be kind of right...  I do know that Request.Form("whatever") will not work becuase of the file-data encytpe.  I may try objFileUp.Form("whatever") = "yes"
Avatar of sl1nger

ASKER

mk b - also I need to keep the upload form on the same page, so the user can have the option to upload or remove at anytime...