problem characters

Discussion in 'ASP .Net' started by John Hopper, Jun 27, 2003.

  1. John Hopper

    John Hopper Guest

    Dim txtComments As String = Request.Form("tbComments")
    causes an "unterminated string error" at runtime
    when "tbComments" contains an apostrophe, a carriage
    return, etc. and they are being rendered in the browser
    within the txtComments textbox.

    Before .net I replaced "'" with "''", etc and all was
    well. This doesn't seem to work now. SqlServer stores a
    carriage return but truncates the text in "open table,
    return all rows" at the point of occurance. I've tried
    htmlEncode, chr(13), etc etc

    I've replaced the "'" with "", since nothing else seemed
    to work.

    How are others solving this type of problem?

    Thank you,

    John Hopper
    John Hopper, Jun 27, 2003
    #1
    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. Replies:
    2
    Views:
    751
  2. Stefan Mueller
    Replies:
    3
    Views:
    32,953
    Stefan Mueller
    Jul 23, 2006
  3. omegaman
    Replies:
    1
    Views:
    555
    omegaman
    Sep 21, 2004
  4. Micah
    Replies:
    2
    Views:
    330
    Micah
    Jun 2, 2006
  5. Replies:
    4
    Views:
    331
    Keith Thompson
    Dec 14, 2006
Loading...

Share This Page