1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

ASP upload file problem

Discussion in 'C#' started by angelran, Sep 27, 2005.

  1. #1
    Hi Guys,
    i've downloaded some ASP code which can upload files and it can insert file name, size to the database. also it allows you to specify the database path and upload folder path. Now i want to add a textarea in the form and can the file introduction form user, then instert it to the database when file is uploaded. but the problem is i cannot get value from the textarea and it always the blank in the database. i upload the zip file, some one can give me a hand??

    cheers

    p.s. i've add a data field in datas.mdb called intro, and i write
    dim file_intro
    file_intro=request.Form("intro")
    try to get the value from the textarea(name intro)
    this code is placed at the beginning of uploadScript.asp file
    SEMrush
     

    Attached Files:

    • web.zip
      File size:
      31.6 KB
      Views:
      491
    angelran, Sep 27, 2005 IP
    SEMrush
  2. JamieC

    JamieC Well-Known Member

    Messages:
    226
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    138
    #2
    Forms in ASP do strange things when you're uploading binary data.

    First thing I would say is try to retrieve the ascii data FIRST - before unleashing your downloaded code on the rest of the form.

    If you have the ability to install components on your server, I would recommend you take a look at ASP Upload, which is the component I use. This component has its own properties which allow you to access the text elements of the form as well as the binary data.
     
    JamieC, Oct 19, 2005 IP
  3. stueym

    stueym Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Have you tried the asp upload component from persits software it makes uploading files and images a breeze! Just a few lines of code
     
    stueym, Oct 21, 2005 IP
  4. Zinho

    Zinho Peon

    Messages:
    284
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Make sure in the form tag there's the right enctype:
    <form action="submit.asp" method="POST" ENCTYPE="multipart/form-data">
    HTML:
    Hope this helps
     
    Zinho, Oct 28, 2005 IP