1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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"
    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)

    rsk_beckon, Sep 4, 2009 IP
  2. ccoonen

    ccoonen Well-Known Member

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