Groups | Blog | Home
all groups > inetserver asp general > august 2005 >

inetserver asp general : can we show the value in source code but hide it in the screen?


jrefactors NO[at]SPAM hotmail.com
8/19/2005 10:19:17 AM

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.
Bob Barrows [MVP]
8/19/2005 2:16:50 PM
[quoted text, click to view]

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"

Dave Anderson
8/19/2005 4:03:14 PM
[quoted text, click to view]


Of course, this solution depends on --> not being in rRes(10).

[quoted text, click to view]

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.

Bob Barrows [MVP]
8/20/2005 9:46:34 AM
[quoted text, click to view]
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"

diarmaid NO[at]SPAM calvert.com
9/1/2005 11:47:57 AM
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?
Ferd Berfle
9/7/2005 12:00:00 AM
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


[quoted text, click to view]

AddThis Social Bookmark Button