FileUpload1.FileName Question

Discussion in 'ASP .Net Web Controls' started by Edge1960, Mar 6, 2007.

  1. Edge1960

    Edge1960 Guest

    I am using Visual Web Developer along with SQLExpress on a WinXP Pro
    2002 SP2 machine with a 3.79 GHz processor with 2GB of RAM to create a
    web application for entering data to a database. I am using the
    following code to call up a filename into a textbox. I use the textbox
    to add the filename to the database along with other information
    gathered on my form.

    <script runat="server">
    Sub UploadButton_Click(ByVal sender As Object, ByVal e As
    System.EventArgs)

    If (FileUpload1.HasFile) Then
    Dim dale As String = (FileUpload1.FileName)

    TextBox1.Text = dale

    End If

    End Sub

    </script>

    My problem is that there are instances that the filename cannot be
    called up. The connection to the server keeps getting reset -

    The connection was reset
    The connection to the server was reset while the page was loading.
    * The site could be temporarily unavailable or too busy. Try
    again in a few
    moments.
    * If you are unable to load any pages, check your computer's
    network
    connection.
    * If your computer or network is protected by a firewall or
    proxy, make sure
    that Firefox is permitted to access the Web.

    IE gives a similar response.

    At first I thought it had something to do with the type of file it was
    trying to get the name from, ie., I got the problem consistently with
    files with the .zip extension. I later proved that out as being
    incorrect.

    When I am sucessful with the filename event, my database updates
    correctly.

    The filenames I am attempting to retrieve are also on a different
    server on the LAN. I am able to use the function to get other
    filenames from the same folder with no problem so it doesn't seem to
    be a permissions related problem.

    I have also copied the file to my desktop and have had no luck
    retrieving the filename.

    I have been fighting this for days before posting this as I wanted to
    give as much information as possible. This, of course, means that I am
    overlooking something very obvious. Let me know what you might think
    could be the problem.
    Edge1960, Mar 6, 2007
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Horace Nunley

    is fileupload1 visible

    Horace Nunley, Sep 27, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    336
    Horace Nunley
    Sep 27, 2006
  2. Edge1960

    FileUpload1.FileName Question

    Edge1960, Mar 6, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    533
    Edge1960
    Mar 6, 2007
  3. Rafael tejera

    FileUpload1 Access problem

    Rafael tejera, Nov 7, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    420
    Teemu Keiski
    Nov 8, 2007
  4. Peter Otten
    Replies:
    0
    Views:
    417
    Peter Otten
    Nov 30, 2010
  5. Peter Otten
    Replies:
    10
    Views:
    864
    Nobody
    Dec 2, 2010
Loading...

Share This Page