ENCTYPE="multipart/form-data" ...Please Help

Results 1 to 2 of 2

Thread: ENCTYPE="multipart/form-data" ...Please Help

  1. #1
    Join Date
    Dec 1969

    Default ENCTYPE="multipart/form-data" ...Please Help

    I have a form which allows the user to browse and upload the file and send it to the server. For this I am using ENCTYPE="multipart/form-data" but when I put it in the form tag it does not process my asp page at all even response.write("sds")<BR>but if I take it ENCTYPE="multipart/form-data" out of my form tag it processes it perfectly.<BR>Pleas help me what could be the problem I have wasted enough time already on it.<BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: ENCTYPE=

    first off are you using a 3rd party upload component like ASPUpload or alike, just because you add ENCTYPE="multipart/form-data" does not mean that the form will upload files to your server<BR><BR>sencondly you cannot use Request.form("FieldName") or response.write to get the value of an Encrytped form field you would have to do something like<BR><BR>For Each File in Upload.Files<BR>StrFile = File.ExtractFileName<BR>Next<BR><BR>to get file name or File.Path to get the full path<BR><BR>to get form field values it would be something like <BR><BR>For Each Item in Upload.Form<BR> Response.Write Item & "=" & Item.Value & "<BR>"<BR> End If<BR>Next<BR><BR>and that is only after the upload process has completed <BR><BR>This code is for ASPUpload I don&#039t know the syntax for other components <BR><BR>the full process would look like<BR><BR>Set Upload = Server.CreateObject("Persits.Upload.1")<BR>Count = Upload.SaveVirtual("/Somefolderwithwritepermissions/") <BR>For Each File in Upload.Files<BR>StrFile = File.ExtractFileName<BR>Next<BR><BR>Response.write StrFile & "has been uploaded<BR>" & vbcrlf <BR><BR>For Each Item in Upload.Form<BR> Response.Write Item & "=" & Item.Value & "<BR>" & vbcrlf<BR> End If<BR>Next<BR><BR>Set Upload = Nothing<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts