Classic asp debug

Hi

have the following ASP code:

<%
d = Request.ServerVariables("URL")
Select Case d
  Case /ybm/about.asp
    ybtitle="About Yellow Brick Mortgages"
    ybdesc = "Yellow Brick Mortgages are a Norfolk Based expert Mortgage and Protection brokerage providing quality advice on mortgages, life insurance and other mortgage and lifestyle protections."
    ybdesc = ybdesc & " Yellow Brick Mortgages has over 150 years of combined experience and can see clients face to face or over the telephone to suit their need. Yellow Brick Mortgages donates to charity on completion"
    ybdesc = ybdesc & " of every mortgage application."
    ybkeywords = "Yellow Brick Mortgages, Mortgage Broker, Norfolk, Experienced, Expert, Mortgage Advice, Charity"
  Case /ybm/people.asp
    ybtitle="Our People - Yellow Brick Mortgages"
    ybdesc = "We have 9 mortgage and protection advisers spread over Norfolk to help you with your advice needs, the Our People page gives you information on their over 150 years of combined experience along with"
    ybdesc = ybdesc & " each advisors mobile number and email address."
    ybkeywords = "Yellow Brick Mortgages, Mortgage Broker, Norfolk, Experienced, Expert, Mortgage Advice, Charity, people first, our people, team, profiles, people profiles"
  Case /ybm/charity.asp
    ybtitle="Giving Back (charity) - Yellow Brick Mortgages"
    ybdesc = "Yellow Brick Mortgages believes passionately in giving back to our local community, which is why we donate to one of our three chosen local Norfolk charities on completion of every mortgage."
    ybdesc = ybdesc & " Each client decides at application which of the three charities they wish the donation from us to go to on completion of their mortgage."
    ybkeywords = "Yellow Brick Mortgages, Mortgage Broker, Norfolk, Experienced, Expert, Mortgage Advice, Charity, giving back, local is best, helping others, making a difference, community"
  Case /ybm/purchase.asp
   ybtitle="Purchasing Guide - Yellow Brick Mortgages"
    ybdesc = "This step by step process makes the house-buying journey easy and simple for our clients. Each stage goes into more detail on how we help throughout this process. Let us help guide you into your new home"
    ybkeywords = "Yellow Brick Mortgages, Mortgage Broker, Norfolk, Experienced, Expert, Mortgage Advice, purchasing, mortgage guide, home buying guide, step by step"
  Case /ybm/remortgage.asp
    ybtitle="Remortgage Guide - Yellow Brick Mortgages"
    ybdesc = "Your step by step guide to remortgaging with Yellow Brick Mortgages. Each stage goes into more detail on how we help throughout this process. Let us take all the stress away from your remortgage."
    ybkeywords = "Yellow Brick Mortgages, Mortgage Broker, Norfolk, Experienced, Expert, Mortgage Advice, remortgage, mortgage guide, best advice, new mortgage, save money"
  Case /ybm/prodtrans.asp
    ybtitle="Product Transfers - Yellow Brick Mortgages"
    ybdesc = "Sometimes it is best advice for you to stay with your existing mortgage lender and switch to a new rate with them, where this is the case we can help make this easy and simple for you and do this for free"
    ybkeywords = "Yellow Brick Mortgages, Mortgage Broker, Norfolk, Experienced, Expert, Mortgage Advice, product transfer, free service, no charge, new rate, existing lender"
  Case else
    ybtitle="Norfolk's Expert Mortgage & Protection Brokerage - Yellow Brick Mortgages"
    ybdesc = "Expert Mortgage & Protection brokerage based on Norfolk and Suffolk but servicing the whole UK. YBM donates to charity on completion of every mortgage application."
    ybdesc = ybdesc & " We offer all your mortgage and protection needs under one roof."
    ybkeywords = "mortgage, mortgages, advice, mortgage advice, mortgage broker, broker, brokerage, protection, insurance, home insurance, life insurance, income protection, equity release, porting, secured loans, norfolk, suffolk,"
    ybkeywords = ybkeywords & " mortgage broker norfolk, mortgage broker suffolk, mortgage adviser norfolk, mortgage adviser suffolk, giving back, charity, mortgage wymondham, yellow brick mortgages, yellow brick, YBM"
End Select

%>


  <meta name="description" content="<%Response.Write("ybdesc")%>">
  <meta name="keywords" content="<%Response.Write("ybkeywords")%>">
  <meta name="author" content="Yellow Brick Mortgages Ltd">
<title><%Response.Write("ybtitle")%></title>




getting server errors, and not sure why, anyone able to see where I went wrong?

Surround the values you’re comparing in quotes to make them strings. i.e.

Case /ybm/about.asp

should be

Case "/ybm/about.asp"

I’m guessing it’s trying to do some math with uninitialized (because they’re not supposed to be) variables.

awesome, thank you DaveMaxwell. probably because all examples of select case online are using integers rather than strings!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.