Results 1 to 2 of 2

Thread: Using Server.URLEncode in a VB program

  1. #1
    Guest
    How do I use the Server.URLEncode method (in the ASP Type Library) in a normal VB program?

    I know I've got it on my machine (I've got PWS installed which uses it) and I've added it to my project's references.

    Basically I want to use a line of code like:
    Code:
    sTemp = Server.URLEncode(txtMessage)

    I'm using this sotra code to set it up:
    Code:
    Dim objURLFix As Server
        Set objURLFix = CreateObject("Server")
    But I can't get it to work... I either get an error about ActiveX not being able to create the (Server) object, or object variable or with block not set.

    So come on guys...what's the correct syntax to declare the server object?

  2. #2
    Addicted Member mralston's Avatar
    Join Date
    Aug 2002
    Location
    Altrincham Nr Manchester, England
    Posts
    141
    You possibly need to add a reference to the Scripting runtime. I can't remember off the top of my head its exact name, but if you look through the list of possible references you should see it.

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