473,395 Members | 1,393 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,395 software developers and data experts.

Quote Trouble

I have a style variable below that I can't figure correct quotes for in
response.write line. Any help?
CODE:

sTeamVisible = "visibility: visible;"
Response.Write "<td class=""teamdrop1"" style=""" & sTeamVisible & """ & " "
& RenderTeamFilter(teamID) & "</td>" & vbCrLf
Aug 3 '05 #1
9 1376
Response.Write "<td class='teamdrop1' style='" & sTeamVisible & "'" & " " &
RenderTeamFilter(teamID) & "</td>" & vbCrLf

Bob Lehmann

"scott" <sc***@sbailey.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I have a style variable below that I can't figure correct quotes for in
response.write line. Any help?
CODE:

sTeamVisible = "visibility: visible;"
Response.Write "<td class=""teamdrop1"" style=""" & sTeamVisible & """ & " " & RenderTeamFilter(teamID) & "</td>" & vbCrLf

Aug 3 '05 #2
Are you getting an error? If not, what tells you it's not right? What does
a view-source give you? What does RenderTeamFilter return?

Ray at home

"scott" <sc***@sbailey.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I have a style variable below that I can't figure correct quotes for in
response.write line. Any help?
CODE:

sTeamVisible = "visibility: visible;"
Response.Write "<td class=""teamdrop1"" style=""" & sTeamVisible & """ & "
" & RenderTeamFilter(teamID) & "</td>" & vbCrLf

Aug 3 '05 #3
thanks for opening my eyes, i forgot about the single quotes with styles.
"Bob Lehmann" <no****@dontbotherme.zzz> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Response.Write "<td class='teamdrop1' style='" & sTeamVisible & "'" & " "
&
RenderTeamFilter(teamID) & "</td>" & vbCrLf

Bob Lehmann

"scott" <sc***@sbailey.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I have a style variable below that I can't figure correct quotes for in
response.write line. Any help?
CODE:

sTeamVisible = "visibility: visible;"
Response.Write "<td class=""teamdrop1"" style=""" & sTeamVisible & """ &
"

"
& RenderTeamFilter(teamID) & "</td>" & vbCrLf


Aug 3 '05 #4
>I have a style variable below that I can't figure correct quotes for in
response.write line. Any help?


Response.Write "<td class=tempdrop1 style='" & sTeamVisible & "'>"
Response.Write RenderTeamFilter(TeamID)
Response.Write "</td>" & vbCrLf

I find it easier to read and manage quotes if I omit them when not necessary
(e.g. around a word like "teamdrop1"). No, this isn't explicitly correct,
but it sure is useful during debugging, especially when working in an editor
that doesn't make a clear distinction between two ' and one " ...

I also find it easier to manage stuff like this if I break separate elements
onto their own line. Your main problem here, I think, is that you forgot to
close the opening <td> tag. So the resulting output (which you would have
been able to discover if you viewed source) was something like:

<td class="teampdrop1" style="visibility: visible" result of
renderTeamFilter(TeamID)</td>

I find little value in adding all these vbCrLf to the output HTML, unless
you really have a need for the output to be tidy (such as debugging complex
and dynamic HTML layout).

Finally, since the default visibility *is* visible, there is no reason to
explicitly declare this style (you could make it an attribute of tempdrop1
class if you really wanted to), the only time you would need to override the
default and explicitly declare a style attribute is if you were setting it
to something *other* than visible. So your ASP code could just as easily
look like this, and the result in terms of appearance and functionality will
be exactly the same:

<%
....
Response.Write "<td class=tempdrop1>"
Response.Write RenderTeamFilter(TeamID)
Response.Write "</td>"
....
%>

or:

<%
....
Response.Write "<td class=tempdrop1>" & RenderTeamFilter(TeamID) & "</td>"
....
%>

or:

<%
....
Response.Write "<td class=tempdrop1>" & _
RenderTeamFilter(TeamID) & "</td>"
....
%>

or:

<td class=tempdrop1><%=RenderTeamFilter(TeamID)%></td>

There are many ways to skin a cat. Some are a little more likely than
others to yield scratches, cuts & bruises.
Aug 3 '05 #5
i was until bob helped. ie was giving error about quotes.
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:OU**************@TK2MSFTNGP09.phx.gbl...
Are you getting an error? If not, what tells you it's not right? What
does a view-source give you? What does RenderTeamFilter return?

Ray at home

"scott" <sc***@sbailey.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
I have a style variable below that I can't figure correct quotes for in
response.write line. Any help?
CODE:

sTeamVisible = "visibility: visible;"
Response.Write "<td class=""teamdrop1"" style=""" & sTeamVisible & """ &
" " & RenderTeamFilter(teamID) & "</td>" & vbCrLf


Aug 4 '05 #6
thanks for the tips, you're right about keeping it simple.

my reason for the visible variable is i'm hiding/showing that cell.

thanks for your help and extra explanation.

"Aaron Bertrand [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:eD*************@TK2MSFTNGP09.phx.gbl...
I have a style variable below that I can't figure correct quotes for in
response.write line. Any help?


Response.Write "<td class=tempdrop1 style='" & sTeamVisible & "'>"
Response.Write RenderTeamFilter(TeamID)
Response.Write "</td>" & vbCrLf

I find it easier to read and manage quotes if I omit them when not
necessary (e.g. around a word like "teamdrop1"). No, this isn't
explicitly correct, but it sure is useful during debugging, especially
when working in an editor that doesn't make a clear distinction between
two ' and one " ...

I also find it easier to manage stuff like this if I break separate
elements onto their own line. Your main problem here, I think, is that
you forgot to close the opening <td> tag. So the resulting output (which
you would have been able to discover if you viewed source) was something
like:

<td class="teampdrop1" style="visibility: visible" result of
renderTeamFilter(TeamID)</td>

I find little value in adding all these vbCrLf to the output HTML, unless
you really have a need for the output to be tidy (such as debugging
complex and dynamic HTML layout).

Finally, since the default visibility *is* visible, there is no reason to
explicitly declare this style (you could make it an attribute of tempdrop1
class if you really wanted to), the only time you would need to override
the default and explicitly declare a style attribute is if you were
setting it to something *other* than visible. So your ASP code could just
as easily look like this, and the result in terms of appearance and
functionality will be exactly the same:

<%
...
Response.Write "<td class=tempdrop1>"
Response.Write RenderTeamFilter(TeamID)
Response.Write "</td>"
...
%>

or:

<%
...
Response.Write "<td class=tempdrop1>" & RenderTeamFilter(TeamID) & "</td>"
...
%>

or:

<%
...
Response.Write "<td class=tempdrop1>" & _
RenderTeamFilter(TeamID) & "</td>"
...
%>

or:

<td class=tempdrop1><%=RenderTeamFilter(TeamID)%></td>

There are many ways to skin a cat. Some are a little more likely than
others to yield scratches, cuts & bruises.

Aug 4 '05 #7
CJM

"Aaron Bertrand [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:eD*************@TK2MSFTNGP09.phx.gbl...

I find it easier to read and manage quotes if I omit them when not
necessary (e.g. around a word like "teamdrop1"). No, this isn't
explicitly correct, but it sure is useful during debugging, ....
It's is either explicitly correct or incorrect depending on what DOCTYPE you
are validating against.

For HTML4.01 and earlier, quotes are optional (though I prefer them).

For XHTML, they are mandatory for validation.

But, hell...who validates in this group?

There are many ways to skin a cat. Some are a little more likely than
others to yield scratches, cuts & bruises.


With your permission, I think I might borrow this line.

Chris
Aug 4 '05 #8
> my reason for the visible variable is i'm hiding/showing that cell.

You can still do that without explicitly starting it off as visible (since
it does that by default anyway). But unless you are affecting the whole
class en masse in client-side script, the element will need an id to
reference.

A
Aug 4 '05 #9
> It's is either explicitly correct or incorrect depending on what DOCTYPE
you are validating against.
If you are validating at all. :-)
With your permission, I think I might borrow this line.


By all means.
Aug 4 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: James | last post by:
Hi I am having some trouble getting a asp page to load. Im a noob to the asp side. I have followed knowledege base Article 301305. I am running 2000 adv, IIS 5.0 I have the following...
4
by: Jacek Dziedzic | last post by:
Hi! First of all, I hope my problem is not too loosely tied to the "standard C++" that is the topic of this group. I have some code that exhibits a strange behaviour: on one computer, where I...
0
by: Paul C | last post by:
Hello, everybody. I am having trouble running some of the VS.NET samples, specifically the CarSelector web app, which is very simple. The symptom is that the web controls (drop down listboxes and...
0
by: Alexandre Jaquet | last post by:
Hi does anybody know how to solve my trouble, when I try to create a MS Office project I always got trouble. I can't create office project when I try to create one vs.net restart ... :s
2
by: Jeff | last post by:
/* -------------------------------------------------------------------------- Hello, I was experimenting with class templates and specializing member functions and came across a simple problem...
1
by: Jim Bancroft | last post by:
Hi everyone, I'm running into a problem with my ASP.Net application. I've just created a new aspx page which uses some new components of mine that inherit from ServicedComponent and are...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
3
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : ...
2
by: JLupear | last post by:
I am having trouble with my code again, I had prepared a question and the code to upload, however I am having trouble posting it, are there limits to the amount of lines you can post? I split it...
0
by: mrchatgroup | last post by:
news from http://www.mrchat.net/myblog/myblog/small-accidents-mean-big-trouble-for-supercollider.html Small Accidents Mean Big Trouble for Supercollider Image Scientists expect startup...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.