473,386 Members | 1,754 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Passing a doble-quote character to response.write

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
9 30245
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
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
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
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
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
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
"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
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Andy Read | last post by:
Dear all, I thought I understood passing parameters ByVal and ByRef but I clearly don't! If I define a simple class of: Public Class Person Public Name as String Public Age as Integer End...
8
by: Alex Vinokur | last post by:
Various forms of argument passing ================================= C/C++ Performance Tests ======================= Using C/C++ Program Perfometer...
15
by: Dave | last post by:
I'm currently working on a small project (admitedly for my CS class) that compares the time difference between passing by value and passing by reference. I'm passing an array of 50000 int's. ...
58
by: jr | last post by:
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of...
2
by: dave.harper | last post by:
I'm relatively new to C++, but have a question regarding functions and arrays. I'm passing a relatively large array to a function several thousand times during the course of a loop, and it seems...
9
by: Just Me | last post by:
PARAFORMAT2 is a structure that SendMessage will return stuff in. Is the "ref" correct or since only a pointer is being passed should it be by value? Suppose I was passing data rather then...
8
by: Dennis Myrén | last post by:
I have these tiny classes, implementing an interface through which their method Render ( CosWriter writer ) ; is called. Given a specific context, there are potentially a lot of such objects,...
6
by: MSDNAndi | last post by:
Hi, I get the following warning: "Possibly incorrect assignment to local 'oLockObject' which is the argument to a using or lock statement. The Dispose call or unlocking will happen on the...
61
by: academic | last post by:
When I declare a reference variable I initialize it to Nothing. Now I'm wondering if that best for String variables - is "" better? With Nothing I assume no memory is set aside nor GC'ed But...
12
by: Andrew Bullock | last post by:
Hi, I have two classes, A and B, B takes an A as an argument in its constructor: A a1 = new A(); B b = new B(a1);
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.