<<
I have a form where a user enters their name, date etc.
i also want them to be able to click on a browse button and select a
file which will then appear in a textbox. when they press submit i want
the file name and path to be put into the database. e.g.
"C:\windows\work\work.doc". Basically I don't want to UPLOAD the file
just enable the user to browse to it and send the filename and path to
the database.
Here is a test file that works for me:
<html>
<body>
<%
' If there was a post.
If Request.Form.Count > 0 Then
Response.Write "LName = " & Request.Form("LName") & "<br>"
Response.Write "FileLocationOnClientPC = " &
Request.Form("FileLocationOnClientPC") & "<br>"
Else
%>
<form id="frmMain" name="frmMain" action="<%=
Request.ServerVariables("SCRIPT_NAME") %>" method="post">
LName: <input type="text" name="LName"><br>
FileLocationOnClientPC: <input type="file"
name="FileLocationOnClientPC"><br>
<input type="submit" name="btnSubmit" value="Submit"><br>
<%
End If
%>
</form>
</body>
</html>
Best regards,
J. Paul Schmidt, Freelance ASP Web Designer
http://www.Bullschmidt.com
ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
*** Sent via Devdex
http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!