Jump to content

Send text file with form, read in response


Recommended Posts

Hey Guys

 

Not quite sure how to word this but here goes...

 

I have a basic form with one input to insert a file, specifically a plain text file.

 

I wish to add a text file and send it with the form, then on the response page read the text in from this file and store it in a variable so that it can be manipulated (it's a delimited text file, I intend to use JavaScript to separate it into individual page variables and assign these to text fields, if possible).

 

Is this even possible? I've tried searching but I'm not entirely sure what I'm searching for.

 

My form is as follows:

<form name="form1" action="nextPage.asp" method="post"><div align="center"><table width="500" height="250" border="0" style="border-collapse: collapse" bordercolor="#111111" cellpadding="2" cellspacing="0" bgcolor="#336699"><tr><td align="center"><p align="center"><input type="file" id="myFile"></td></tr></table></div></form>

Please help

 

Thanks

Link to post
Share on other sites

If you're using classic ASP, then out of the box it does not make handling file uploads easy. The best thing to do is install a file upload component to do the work of dealing with the incoming form for you. There should be plenty of information about handling file uploads in ASP online, but much of it is probably out of date because classic ASP is old and has been replaced with ASP.net.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...