asp upload

S

Sanju

I keep getting this error whenever I run my ASP page
(1)
Error Type:
Server object, ASP 0177 (0x800401F3)
Invalid class string
/attachfiles_txtdoc/resultspage.asp, line 6

=========================================
<!--#INCLUDE VIRTUAL="\attach_files\connection.asp" -->

<%
DIM objRSr, File, Upload, Count, Ext
DIM Mail, strMsgHeader
Set Upload = Server.CreateObject("Persits.Upload.1")
Count = Upload.SaveVirtual("/contactus/hr/upload/")

IF NOT Count=0 THEN
FOR EACH File IN Upload.Files
Ext = UCase(Right(File.Path, 3))
IF Ext <> "TXT" AND Ext <>
"DOC" THEN
Response.Write
Upload.Form("FirstName") & ",<br><br>"
Response.Write
"Sorry, your resume " & File.Path & " is not in a .DOC or .TXT format and has
not been delivered through our system. Please save your resume in one of
these formats and resubmit it."
File.Delete
ELSE

Set objRSr =
Server.CreateObject("ADODB.Recordset")
objRSr.Open
"tblContact", objConn, , adLockOptimistic, adCmdTable

objRSr.AddNew
objRSr("Data") =
"Resumes"
objRSr("Email") =
Upload.Form("Email")
objRSr("FirstName")
= Upload.Form("FirstName")
objRSr("LastName") =
Upload.Form("LastName")
objRSr("Position") =
Upload.Form("Position")
objRSr("Comments") =
Upload.Form("Comments")

objRSr("DateSubmitted") = Date()
Set File =
Upload.Files("fResume")
If Not File Is
Nothing Then objRSr("fResume").Value = File.Binary
objRSr.Update

objRSr.Close
Set objRSr =
Nothing


Set Mail =
Server.CreateObject("Persits.MailSender")
Mail.Host =
"leosweb.com"
Mail.From =
Upload.Form("Email")
Mail.AddAddress
"(e-mail address removed)"
Mail.Subject =
"Resume"
strMsgHeader =
"This email was delivered from your website." & vbCrLf & vbCrLf
Mail.Body =
strMsgHeader & "Email: " & Upload.Form("Email") & vbCrLf & "First Name: " &
Upload.Form("FirstName") & vbCrLf & "Last Name: " & Upload.Form("LastName") &
vbCrLf & "Position: " & Upload.Form("Position") & vbCrLf & vbCrLf &
"Comments: " & Upload.Form("Comments")

IF Count > 0 THEN

Mail.AddAttachment Upload.Files(1).Path

On Error Resume Next
Mail.Send

IF Err <> 0
THEN

Response.Write "There was an error sending your message. Please visit our
Contact Us page and send a message to our Webmaster to report this error:
<B>" & Err.Description & "</B>"
ELSE

Response.Write Upload.Form("FirstName") & ","

Response.Write "<p>Thank you for contacting our recruiter. Your resume has
been received and will be reviewed shortly. If we have a position is
available that matches your skills, we will contact you to schedule an
interview. We keep all resumes on file for a period of 6 months, please feel
free to resubmit your resume after this time for future consideration.</p>"

File.Delete
END IF
END IF
END IF

NEXT
END IF

%>

<P>
<%
' This is a nice way to Personalize your FORM.
' It disPlays the Persons name before your message.
strName = Request.Form("FirstName")
Response.Write strFirstName
%>,</P>

<P>Thank you for emailing us your resume.</P>

=========================================

(2)how to install aspupload component and where do I find that?
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top