Class not defined error in ASP

Discussion in 'C#' started by rsk_beckon, Sep 4, 2009.

  1. #1
    Dear All

    I am trying to send an attachment along with the mail in ASP. Since one must upload the file to the server before attach the file to the mail, I am trying to do the same. I have got an script to upload the file namely "vbsUpload" file. I have also added the includes
    <!-- #include file="http://localhost/RKS/vbsUpload.asp" -->
    also tried
    <!-- #include file="vbsUpload.asp" -->
    But if shows an error Microsoft VBScript runtime (0x800A01FA)
    Class not defined: 'vbsUpload' at the line
    Set objUpload = New vbsUpload

    I am testing with my localserver having ASP .NET 2.0

    'Here is my Code for reg.asp

    <%
    <!-- #include file="http://localhost/RKS/vbsUpload.asp" -->
    dim sSkill,sBasic, sPG,sPosition,sPath

    sSkill = Request.Form("skill")
    sBasic = Request.Form("Basic")
    sPG = Request.Form("PG")
    sPosition= Request.Form("MnuPos")
    sPath= Request.Form("fattach") 'store the attach file

    Dim objUpload, lngLoop
    If Request.TotalBytes > 0 Then
    Set objUpload = New vbsUpload
    For lngLoop = 0 to objUpload.Files.Count - 1
    objUpload.Files.Item(lngLoop).Save sPath
    Response.Write "File Uploaded"
    Next
    End if

    Please suggest me where i am going wrong?

    I am having all files in one folder namely Website Folder ie. html and asp files.(vbsUpload.file,reg.asp,etc)

    Regards
    Sasikumar
     
    rsk_beckon, Sep 4, 2009 IP
  2. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Does something need to be registered in the registry "? is it a com object? I'd start there...
     
    ccoonen, Sep 10, 2009 IP