Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 28th, 2005, 01:21 PM
SKE SKE is offline
Authorized User
 
Join Date: Mar 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default HELP with FILE type in forms !

Hey, I need to write a form that allows me to select a file from the harddrive and then send to an asp file not the file itself but only its name so that I can store it in a Database. Any help ?!?!? THANKS !!!!

 
Old April 29th, 2005, 01:27 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to anshul
Default

I don't know much ASP. My notes: use upload forms use [u]enctype="multipart/form-data"</u>. U need just file-name ( browsed by user ), so don't apply upload fucntion ( in ASP code ), just fetch POST data of filename of input type file. So, file'll not b uploaded. I hope, this is sufficient.

 
Old April 29th, 2005, 03:18 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

I don't think you need to add the enctype attribute, you just need to add an input of type file and check for it's content on your target page. e.g.

Code:
<form name="myForm" method="post">
<input name="myFile" type="file" /><input type="submit" />
</form>

...

fileName = Request.Form("myFile")
HTH,

Chris






Similar Threads
Thread Thread Starter Forum Replies Last Post
input type="file" grstad Classic ASP Basics 24 January 31st, 2007 07:28 PM
Type of file? Hannibal C# 2005 0 January 5th, 2007 02:44 AM
input type file darkhalf Javascript 1 October 29th, 2005 02:17 AM
<input type="File"> - Specify File Type and Path gp_mk Classic ASP Basics 2 August 2nd, 2004 03:07 AM
How to get File type before save to database. monika_jain_99 Pro JSP 1 July 19th, 2003 05:00 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.