|
Prev: some users cannot open asp page or see some images on the intranet
Next: ASP with XML isn't working :-(
From: "Jon Paal [MSMD]" Jon nospam Paal on 16 Mar 2008 23:45 "Dataprep" type function allows for customization, otherwise nothing wrong with your suggested solution...
From: Evertjan. on 17 Mar 2008 04:51 Jon Paal [MSMD] wrote on 17 mrt 2008 in microsoft.public.inetserver.asp.general: > "Dataprep" type function allows for customization, otherwise nothing > wrong with your suggested solution... whose? -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
From: msnews on 17 Mar 2008 05:35 where to get the values of constants like &apos and " also i want to replace single " and not double "" please advise "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot com> wrote in message news:13tqv4u4qegn7c8(a)corp.supernews.com... > '****************************************************************** > Function DataPrep(strText) > ' > 'PURPOSE: prep data text entry > ' > 'PARAMETERS: strText -- text string to modify > '****************************************************************** > If NOT isNull(strText) then > > DataPrep = Replace(strText, ";", "") > DataPrep = Replace(DataPrep, "'", "'") > DataPrep = Replace(DataPrep, """", """) > DataPrep = Replace(DataPrep, "<", "<") > DataPrep = Replace(DataPrep, ">", ">") > > End if > > End Function > > > > > "S N" <uandme72(a)yahoo.com> wrote in message > news:OCmJVc5hIHA.4076(a)TK2MSFTNGP05.phx.gbl... >> how to print apostrophe character ' and double quote " in asp using >> vbscript. >> my code using response.write replaces " character with inverted question >> mark. >> please help >> >> > >
From: Daniel Crichton on 17 Mar 2008 06:06 ' and " are HTML entities - these are converted by web browsers into ' and " respectively. If you just want to print the literal characters, that's easy enough: Response.Write """" will print a single " (there are 4 " in that line, the two outer ones are the string containers, the two inners generate the single " as doubling them up inside a string turns them into a literal instead). another example Response.Write "<a href=""http://myurl.com/apage.asp"">This is a link</a>" Notice how you just double up the quotation marks. For an apostrophe you don't need to do anything special: Response.Write "They're not here" So what problem are you having with quotes and apostrophes? Dan msnews wrote on Mon, 17 Mar 2008 15:05:23 +0530: > where to get the values of constants like &apos and " also i want > to replace single " and not double "" > please advise > "Jon Paal [MSMD]" <Jon nospam Paal @ everywhere dot com> wrote in > message news:13tqv4u4qegn7c8(a)corp.supernews.com... >> '****************************************************************** >> Function DataPrep(strText) >> ' >> 'PURPOSE: prep data text entry ' >> 'PARAMETERS: strText -- text string to modify >> '****************************************************************** >> If NOT isNull(strText) then >> DataPrep = Replace(strText, ";", "") >> DataPrep = Replace(DataPrep, "'", "'") >> DataPrep = Replace(DataPrep, """", """) >> DataPrep = Replace(DataPrep, "<", "<") >> DataPrep = Replace(DataPrep, ">", ">") >> End if >> End Function >> "S N" <uandme72(a)yahoo.com> wrote in message >> news:OCmJVc5hIHA.4076(a)TK2MSFTNGP05.phx.gbl... >>> how to print apostrophe character ' and double quote " in asp using >>> vbscript. >>> my code using response.write replaces " character with inverted >>> question mark. >>> please help
From: Bob Barrows [MVP] on 17 Mar 2008 06:43
Daniel Crichton wrote: > ' and " are HTML entities - these are converted by web > browsers into ' and " respectively. > > If you just want to print the literal characters, that's easy enough: > > Response.Write """" > > will print a single " (there are 4 " in that line, the two outer ones > are the string containers, the two inners generate the single " as > doubling them up inside a string turns them into a literal instead). > > another example > > Response.Write "<a href=""http://myurl.com/apage.asp"">This is a > link</a>" > Notice how you just double up the quotation marks. > > For an apostrophe you don't need to do anything special: > > Response.Write "They're not here" > > So what problem are you having with quotes and apostrophes? > From the original post: "my code using response.write replaces " character with question mark" It's most likely a codepage problem. I've been holding back from replying to this because Anthony typically has the most reliable advice for these situations. -- Microsoft MVP - ASP/ASP.NET Please reply to the newsgroup. This email account is my spam trap so I don't check it very often. If you must reply off-line, then remove the "NO SPAM" |