Results 1 to 7 of 7

Thread: Error Uploading file to Server [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075

    Error Uploading file to Server [RESOLVED]

    Anyone know why I'm getting this error when I try to upload?

    "Object reference not set to an instance of an object."

    <input id="pdfUpload"
    <FORM id="_ctl0" encType="multipart/form-data" runat="server">

    If Not pdfUpload.PostedFile Is Nothing Then
    If pdfUpload.PostedFile.FileName.Trim().Length > 0 And _
    pdfUpload.PostedFile.ContentLength > 0 Then
    Const strBaseDir As String = "C:\PBSS_Uploads\"
    Dim strFilename As String = _
    Path.GetFileName(pdfUpload.PostedFile.FileName)

    pdfUpload.PostedFile.SaveAs(strBaseDir & strFilename)

    End If
    End If
    Last edited by EyeTalion; Dec 9th, 2002 at 10:00 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width