Professional Web Applications Themes

Help needed with ASP form browse for file, create link to file and insert in access database - ASP Database

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. Any help would be appreciated, thanks...

  1. #1

    Default Help needed with ASP form browse for file, create link to file and insert in access database

    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.

    Any help would be appreciated,

    thanks
    Jon D Guest

  2. #2

    Default Re: Help needed with ASP form browse for file, create link to file and insert in access database

    <<
    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
    [url]http://www.Bullschmidt.com[/url]
    ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


    *** Sent via Devdex [url]http://www.devdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!

    Bullschmidt Guest

Similar Threads

  1. read text file insert into database
    By navee in forum Macromedia ColdFusion
    Replies: 2
    Last Post: April 11th, 08:08 AM
  2. Bug: Insert Link (Browse to Web Page) Error
    By trendmedia in forum Macromedia Contribute General Discussion
    Replies: 5
    Last Post: August 24th, 08:41 PM
  3. Create a Browse to File Button
    By canadianflower in forum Macromedia Exchange Dreamweaver Extensions
    Replies: 3
    Last Post: February 28th, 05:11 PM
  4. insert flat file to database
    By chingc in forum Coldfusion - Advanced Techniques
    Replies: 2
    Last Post: June 22nd, 02:29 PM
  5. Insert full path on browse file?
    By J?J in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: March 26th, 07:05 AM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139