SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    Jeremy Maddock WealthStream's Avatar
    Join Date
    Dec 2004
    Location
    Victoria, Canada
    Posts
    2,422
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Using ASP to Turn Text Into Links...

    Is there an ASP command that can I use to make every occurance of a certain word into a link? For example, if I have an article about marketing, and I want every occurance of the word "marketing" to link to a page called marketing.htm, how would I do this using ASP?
    -- Jeremy Maddock
    SEOMix.com - Search Engine Optimization Tips
    My Blog - Business, tech, and politics from a webmaster's perspective

  2. #2
    SitePoint Addict MadDog's Avatar
    Join Date
    Aug 2002
    Location
    Oregon, USA
    Posts
    247
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just use the replace command:

    Code:
     strText = Replace(strText, "marketing", "<a href='marketing.htm'>marketing</a>")
    Drew Gauderman
    ASP/MSSQL/AJAX-Javascript/HTML/CSS Coder
    iPortalX The most secure FREE ASP portal!

  3. #3
    Jeremy Maddock WealthStream's Avatar
    Join Date
    Dec 2004
    Location
    Victoria, Canada
    Posts
    2,422
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Okay, thanks for your help.
    -- Jeremy Maddock
    SEOMix.com - Search Engine Optimization Tips
    My Blog - Business, tech, and politics from a webmaster's perspective


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •