|
-
Dec 5th, 2002, 03:08 PM
#1
Thread Starter
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|