Ouptutting a double quote to a form field value with ASP

Discussion in 'ASP General' started by Giles, Sep 2, 2003.

  1. Giles

    Giles Guest

    If rs("MyString") is Hello "Jim" Lad

    <input type=text value="<%=rs("MyString")%>">

    prints as <input type=text value=" Hello "Jim" Lad">

    How can I get double quotes to display in a text box or textarea? Using a
    backslash or &Quot; (with Replace() e.g.) just prints out the backslash or
    &Quot;

    Thanks
    Giles
    Giles, Sep 2, 2003
    #1
    1. Advertising

  2. Giles

    Ken Schaefer Guest

    Replace " with the corresponding HTML entity, which is &quot;

    Cheers
    Ken


    "Giles" <> wrote in message
    news:...
    : If rs("MyString") is Hello "Jim" Lad
    :
    : <input type=text value="<%=rs("MyString")%>">
    :
    : prints as <input type=text value=" Hello "Jim" Lad">
    :
    : How can I get double quotes to display in a text box or textarea? Using a
    : backslash or &Quot; (with Replace() e.g.) just prints out the backslash
    or
    : &Quot;
    :
    : Thanks
    : Giles
    :
    :
    Ken Schaefer, Sep 2, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sydex
    Replies:
    12
    Views:
    6,453
    Victor Bazarov
    Feb 17, 2005
  2. Replies:
    3
    Views:
    13,149
  3. Eric Layman
    Replies:
    3
    Views:
    616
    Rad [Visual C# MVP]
    Apr 14, 2007
  4. Evan
    Replies:
    3
    Views:
    506
    Marc 'BlackJack' Rintsch
    Nov 4, 2008
  5. vikrant
    Replies:
    8
    Views:
    349
    vikrant
    May 17, 2007
Loading...

Share This Page