Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6204861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:10:13+00:00 2026-05-24T05:10:13+00:00

I have inherited a classic asp site which has a fairly robust custom cms.

  • 0

I have inherited a classic asp site which has a fairly robust custom cms. We have recently moved the site across to one of our hosting machines and have recently noticed some issues with getting values frmo functions in an include file (at least thats what I think is happening). There are a number of nested include files but I am sure that they are all being included correctly.

I am sure that the includes are functioning correctly as I have tested changing the path and it displays an error.

Here is the include code:

<!--#include virtual="/admin/core/functions/fncGlobal.asp" -->

The function I am trying to get a value from is:

Function FormatURL(ByRef in_str)
    Dim BadChars, RepChars, NewString, i
    NewString = Trim(in_str)
    NewString = StripNonAlphaNum(NewString)
    NewString = Trim(NewString)
    NewString = Replace(NewString, " ", "-")
    NewString = Replace(NewString, "----", "-")
    NewString = Replace(NewString, "---", "-")
    NewString = Replace(NewString, "--", "-")
    FormatURL = LCase(NewString)
End Function

The function to strip alpha numeric characters:

Function StripNonAlphaNum(inString)
    Dim oRE, strOutput, theString
    If inString <> Null Then    
        inString = Replace(inString, "'", "")
        inString = Replace(inString, "&amp;", "")
        inString = Replace(inString, "&reg;", "")
        inString = Replace(inString, "&trade;", "")
        inString = Replace(inString, "&copy;", "")
        inString = Replace(inString, "&quote;", "")
        Set oRE = New Regexp
        oRE.Global = True
        oRE.IgnoreCase = True
        oRE.Pattern = "[\W_]"
        strOutput = oRE.Replace(inString, " ")
        StripNonAlphaNum = strOutput
    Else
        StripNonAlphaNum = ""
    End If
End Function

I have tested returning a string from this function but still I get the same blank result.

I am testing the function like this:

Response.Write("Test URL: " & FormatURL("Format URL Title Test"))

The result I get is

Test URL:

Is there something obvious I am doing wrong? I’m not very experienced with ASP.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:10:13+00:00Added an answer on May 24, 2026 at 5:10 am

    The issue is this line in StripNonAlphaNum():

    If inString <> Null Then
    

    To test for Null, you should use instead

    If not IsNull(inString) then
    

    Here is a reference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently inherited a dinosaur Classic ASP site that has some fresh blood pumped
I have recently inherited a website written in Classic ASP, and am currently trying
I have inherited a legacy classic asp site that I need to support, and
I have inherited a client site which crashes every 3 or 4 days. It
I have inherited a classic asp application that had over 800 files in the
I usually do C# but have inherited a classic ASP project. I have defined
I have inherited a site which uses a flash ui with a .net 2.0
I have a project that I have inherited that is primarily a Classic ASP
The legacy web app I have inherited, which was custom-written for Oxfam New Zealand
I have inherited some Classic ASP code and I need a JSON library that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.