coding Plian text email urls

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • KevinC

    coding Plian text email urls

    I'm sure this is an easy one, but I am a relative newcomer to asp.

    I am sending an email to subscibers of a news letter with the url of the
    latest newsletter in the email. this is built up in code. how do i encode it
    to include special characters such as spaces as %20. I have tried a simple
    replace routine but this gives errors on invalid chars.

    thanks


  • Aaron [SQL Server MVP]

    #2
    Re: coding Plian text email urls

    > latest newsletter in the email. this is built up in code. how do i encode
    it[color=blue]
    > to include special characters such as spaces as %20.[/color]

    Why does your URL have to have spaces???
    [color=blue]
    > I have tried a simple
    > replace routine but this gives errors on invalid chars.[/color]

    What "simple replace routine"? What "errors"? What "invalid chars"? Could
    you be more specific? What is the code that you tried? What is the string
    you passed into the function? What was the result?

    Have you considered using Server.URLEncod e?

    --

    (Reverse address to reply.)


    Comment

    • Denzil

      #3
      Re: coding Plian text email urls

      You need the HTMLEncode(strS tringToEncode) of the ASP Server object.

      Refer this link from the Platform SDK for details [Server.HTMLEnco de]:



      Cheerz,
      Denzil

      "KevinC" <Kclayton_rem@v e_ntlworld.com> wrote in message news:<tx0Uc.80$ yv.36@newsfe2-gui.ntli.net>.. .[color=blue]
      > I'm sure this is an easy one, but I am a relative newcomer to asp.
      >
      > I am sending an email to subscibers of a news letter with the url of the
      > latest newsletter in the email. this is built up in code. how do i encode it
      > to include special characters such as spaces as %20. I have tried a simple
      > replace routine but this gives errors on invalid chars.
      >
      > thanks[/color]

      Comment

      • Denzil

        #4
        Re: coding Plian text email urls

        Further to my earlier post, also have a look at Server.URLEncod e -
        that should serve your needs better for encoding URLs - link given
        below.



        Cheerz,
        Denzil

        "KevinC" <Kclayton_rem@v e_ntlworld.com> wrote in message news:<tx0Uc.80$ yv.36@newsfe2-gui.ntli.net>.. .[color=blue]
        > I'm sure this is an easy one, but I am a relative newcomer to asp.
        >
        > I am sending an email to subscibers of a news letter with the url of the
        > latest newsletter in the email. this is built up in code. how do i encode it
        > to include special characters such as spaces as %20. I have tried a simple
        > replace routine but this gives errors on invalid chars.
        >
        > thanks[/color]

        Comment

        Working...