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

can we show the value in source code but hide it in the screen?

P: n/a

I am trying to debug some values in production server.
I want to print the value of rRes(10), but I don't want to
show it in the screen. I just want to show it in the source code
but comment out, so that I can look at the value. Is it possible?

Response.Write("rRes(10) = " & rRes(10)) will show the value in
the screen, but i want to hide it in the screen but still
see the value in the source code.

Aug 19 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
jr********@hotmail.com wrote:
I am trying to debug some values in production server.
I want to print the value of rRes(10), but I don't want to
show it in the screen. I just want to show it in the source code
but comment out, so that I can look at the value. Is it possible?

Response.Write("rRes(10) = " & rRes(10)) will show the value in
the screen, but i want to hide it in the screen but still
see the value in the source code.


Response.Write "<!--rRes(10) = " & rRes(10)) & "-->"

or

Response.Write "<span style='display:none'>rRes(10) = " & _
rRes(10)) & "</span>"

There are a lot of possibilities, including using a <script> block.

Bob Barrows
PS. You might want to try out something like this:
http://support.microsoft.com/kb/299986/EN-US/

--
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"
Aug 19 '05 #2

P: n/a
Bob Barrows [MVP] wrote:
Response.Write("rRes(10) = " & rRes(10)) will show the value in
the screen, but i want to hide it in the screen but still
see the value in the source code.
Response.Write "<!--rRes(10) = " & rRes(10)) & "-->"

Of course, this solution depends on --> not being in rRes(10).
Response.Write "<span style='display:none'>rRes(10) = " & _
rRes(10)) & "</span>"


And this one requires </span> to be excluded. Might not hurt to use
Server.HTMLEncode(RS.Fields(10).Value) in either case...

--
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.
Aug 19 '05 #3

P: n/a
Dave Anderson wrote:
Might not hurt to use
Server.HTMLEncode(RS.Fields(10).Value) in either case...

Yep - I replied too quickly...
--
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"
Aug 20 '05 #4

P: n/a
If Request.ServerVariables("REMOTE_ADDR") = "Your.IP.Address" then
Response.write(rRes(10))

Value will only be displayed if the IP address is yours.

Howzat?

Sep 1 '05 #5

P: n/a
Now, before I say this, lemme say that the two previous answers
are probably better choices for what you want to do.

But, given to the "cheap, quick & dirty" as I too often am:
and assuming you are working with a white background...

response.write("<font color=white> & rRes(10) & "</font>")

Yup! cheap, quick and dirty gets it done!
Unless your site is frequented by the kind of folk who
used to listen to Beatle albums backwards, looking for
hidden messages, only you will know where on the page
to "select" text to see you hidden values.

But, in all honesty,

If Request.ServerVariables("REMOTE_ADDR") = "Your.IP.Address" then
Response.write(rRes(10))
End if

is infinitely safer, since, unless they got business knowing it,
it won't even be on the page in "View Source". But...

If you often work from a machine with a variable IP, like my
DSL at home, then give it a try.
Fred
<jr********@hotmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...

I am trying to debug some values in production server.
I want to print the value of rRes(10), but I don't want to
show it in the screen. I just want to show it in the source code
but comment out, so that I can look at the value. Is it possible?

Response.Write("rRes(10) = " & rRes(10)) will show the value in
the screen, but i want to hide it in the screen but still
see the value in the source code.

Sep 7 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.