Text and files in the same form.

Results 1 to 2 of 2

Thread: Text and files in the same form.

  1. #1
    Join Date
    Dec 1969

    Default Text and files in the same form.

    Hi!<BR><BR>I&#039;m building a form in ASP and VBSCRIPT that allows a user (on an Intranet) to send a file and some text fields on a server. The upload works fine but I dont know how to access the text fields while the form use ENCTYPE="multipart/form-data". I have seen several similar questions on the web but I did&#039;nt find a good answer yet. I read that it could be done using the "Scripting.Dictionary" but I don&#039;t understand how I can transfer text values from the form to the ASP file...<BR><BR>I feel like I&#039;ve read everything on the web on this topic!<BR>How can it be done?!?<BR><BR>JF

  2. #2
    Bradley Guest

    Default RE: Text and files in the same form.

    If you had this in your form (as well as the upload code, not shown):<BR><BR>&#060;INPUT TYPE=TEXT NAME="DESCRIPTION"&#062;<BR> <BR><BR>&#060;SELECT NAME="CATEGORY" MULTIPLE&#062;<BR>&#060;OPTION&#062;Image<BR>&#060 ;OPTION&#062;Text<BR>&#060;OPTION&#062;Source Code<BR>&#060;OPTION&#062;Archive<BR>&#060;/SELECT&#062;<BR><BR><BR>You might have this on the action page:<BR><BR>Response.Write Upload.Form("Description") & "<BR>"<BR><BR>For Each Item in Upload.Form<BR> If Item.Name = "Category" Then<BR> Response.Write Item.Value & "<BR>"<BR> End If<BR>Next<BR><BR>Of course, instead of writing them, you can just assign a local var to them. Also, replace the word "upload" with the name of your object. This is from http://www.aspupload.com/codesample.html<BR>I have found it necessary to use For Each...Next to get this info

Posting Permissions

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