By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,844 Members | 836 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,844 IT Pros & Developers. It's quick & easy.

Passing a doble-quote character to response.write

P: n/a
Hi.

How should I pass a " (doble-quote) character to
response.write() in order for it to be sent to the output ?

Thanks in advance for the help.
Jul 19 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Ricardo wrote:
Hi.

How should I pass a " (doble-quote) character to
response.write() in order for it to be sent to the output ?

Thanks in advance for the help.


Double it (also known as "escaping" it):
response.write "here is a double=quote: ""<BR>"

HTH,
Bob Barrows
Jul 19 '05 #2

P: n/a
Ricardo wrote on 08 jul 2003 in microsoft.public.inetserver.asp.general:
How should I pass a " (doble-quote) character to
response.write() in order for it to be sent to the output ?


If we are speakig about vbscript response.write argument is without ().

<%
response.write "This: "" is a single double quote.<br>"
response.write "This: """" is a double double quote.<br><br>"

response.write "This: &quot; is a single double quote.<br>"
response.write "This: &quot;&quot; is a double double quote."
%>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #3

P: n/a
Actually, VBscript doesn't seem to mind either way:

Response.Write("This is a response")
Response.Write "This is a response"

Both of those are accepted in VBScript without error.

A Ratcliffe

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
Ricardo wrote on 08 jul 2003 in microsoft.public.inetserver.asp.general:
How should I pass a " (doble-quote) character to
response.write() in order for it to be sent to the output ?


If we are speakig about vbscript response.write argument is without ().

<%
response.write "This: "" is a single double quote.<br>"
response.write "This: """" is a double double quote.<br><br>"

response.write "This: &quot; is a single double quote.<br>"
response.write "This: &quot;&quot; is a double double quote."
%>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

Jul 19 '05 #4

P: n/a
A Ratcliffe wrote on 09 jul 2003 in
microsoft.public.inetserver.asp.general:
Actually, VBscript doesn't seem to mind either way:

Response.Write("This is a response")
Response.Write "This is a response"

Both of those are accepted in VBScript without error.


That is not the [my] point. The () however are parsed away by the
expression parser before it reaches the response.write, at the cost of some
extra processing time.

Like:

Response.Write 7.13*1*1*1

results in the same as

Response.Write 7.13

Still the first is not ordinary scripting, as it just ads something
superfluous (*1*1*1) and shows a lack of knowledge of vbscript syntax.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #5

P: n/a
A Ratcliffe wrote on 09 jul 2003 in
microsoft.public.inetserver.asp.general:
since they had to use the parentheses in
Conn.Execute(strSQL)


Is this true ?

I do not use that, but in vb, I shouldn't think so, if we are talking
statements, or functions used as statements, and not functions?

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #6

P: n/a
A Ratcliffe wrote:
Personally I agree with your point, but having had to work on another
coder's scripts which did use the parentheses, I thought it worth
mentioning.

Their reasoning was that since they had to use the parentheses in
Conn.Execute(strSQL)


They did not HAVE to use parentheses, unless they were getting a recordset
back from the method:
Set rs=Conn.Execute(strSQL)
The only reason they were able to get away with using parentheses without
getting anything back:

Conn.Execute(strSQL)

was because they were only passing a single argument to the Execute method.
Try using parentheses in this more appropriate call (you really should be
telling ADO what the CommandType is instead of making it guess ...) to
Execute and see what happens:

Conn.Execute(strSQL..adCmdText)

The rule that has served me very well in the last 10 yrs is:

Only use parentheses when passing arguments to a function whose return value
is being "used".

Of course, I had to unlearn this rule when I started doing jscript, and I
understand that the rule is no longer valid in vb.net.

HTH,
Bob Barrows
Jul 19 '05 #7

P: n/a
"Evertjan." wrote:

Response.Write 7.13*1*1*1

results in the same as

Response.Write 7.13

Still the first is not ordinary scripting, as it just ads something
superfluous (*1*1*1) and shows a lack of knowledge of vbscript syntax.


While I agree that multiple identity multiplications are superfluous, I
don't see how using them demonstrates lack of knowledge of VBScript syntax.
Would you suggest a different multiplication operator?

I suppose you were trying to say that Response.Write(7.13) demonstrates such
a lack. In that case, would you accept the use of

Call Response.Write(7.13)

as demonstrating knowledge of VBScript syntax? Or does your definition of
"syntax" only mean "what I'm used to seeing"?
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #8

P: n/a
Dave Anderson wrote on 10 jul 2003 in
microsoft.public.inetserver.asp.general:
"Evertjan." wrote:
Call Response.Write(7.13)


This is no question of accepting this, this is pure nonsense.

The Call statement is to use a function as a statement,


Incorrect. The Microsoft documentation describes as [Call] an "optional
keyword" of the Call Statement, which is implicit in every Sub/Function
call. In other words, it is syntactically valid.


I will forgo on your furter remarks by explaining that M$ did not invent
Basic, that it's documentation is not the Bible, nor is M$ God.

If I critisize M$ for some idea's, your telling me that M$'s changing of
the basic Basic principles in VB makes my critique incorrect, is ludicrous.

Bill Gates' own ideas, as seen in "Central Data Basic" for the Signetic's
2650 microprocessor, from around 1982, expanding the original Basic concept
into the direction of the modern VB concept, were far more sound than the
lozening of the syntax adopted nowadays by M$.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #9

P: n/a
"Evertjan." wrote:
The Microsoft documentation describes as [Call] an "optional
keyword" of the Call Statement, which is implicit in every
Sub/Function call. In other words, it is syntactically valid.
I will forgo on your furter remarks by explaining that M$ did not
invent Basic, that it's documentation is not the Bible, nor is M$
God.


We're not talking about Basic, we're talking about VBScript. And VBScript is
whatever Microsoft says it is, which makes the MS documentation 100%
relevant.
If I critisize M$ for some idea's, your telling me that M$'s
changing of the basic Basic principles in VB makes my critique
incorrect, is ludicrous.
What is ludicrous is the assertion that VBScript is Basic -- or even an
implementation of Basic. It's a separate scripting language intended to be
familiar to Basic programmers, and nothing more.
Bill Gates' own ideas, as seen in "Central Data Basic" for the
Signetic's 2650 microprocessor, from around 1982, expanding
the original Basic concept into the direction of the modern VB
concept, were far more sound than the lozening of the syntax
adopted nowadays by M$.


Start with a false pretense and you can conclude anything you desire.
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 19 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.