convert html to asp using response.write

E

eddie wang

How to convert the following html to asp page using response.write?
Thanks.

<td align="right"><Font class=content4><%=ars.Fields("REVENUE")%></td>
 
R

Roland Hall

:
: How to convert the following html to asp page using response.write?
: Thanks.
:
: <td align="right"><Font class=content4><%=ars.Fields("REVENUE")%></td>

Response.Write("<td align=""right""><Font class=""content4"">" &
ars.Fields("REVENUE") & "</font></td>")

I would use this instead...

Response.Write("<td class=""content4"">" & ars.Fields("REVENUE") & "</td>")

Add this to content4 class.
text-align: right;

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 
B

Bob Barrows

Roland said:
Response.Write("<td align=""right""><Font class=""content4"">" &
ars.Fields("REVENUE") & "</font></td>")

I would use this instead...

Response.Write("<td class=""content4"">" & ars.Fields("REVENUE") &
"</td>")

Add this to content4 class.
text-align: right;

Unless you wanted to override what's in the content4 class for this
particular instance ... :)

Bob Barrows
 
B

Bob Barrows [MVP]

Roland said:
...but shouldn't he also make this change?
Response.Write("<td class=""content4"" style=""text-align: right"">" &
ars.Fields("REVENUE").Value & "</td>")

I know it's not required but isn't it the preferred way?

I know it's preferred, but I hardly ever do it. The guilt is becoming
unbearable. ;-)

Actually, I've never run into a problem I needed to solve by explicitly
specifying the Value property. I tend to avoid coding in ways that make it
matter. Of course, when I start doing .Net, I will have to start changing my
ways...

Bob Barrows
 
R

Roland Hall

:
: Roland Hall wrote:
: > "eddie wang" wrote:
: >> How to convert the following html to asp page using response.write?
: >> Thanks.
: >>
: >> <td align="right"><Font
: >> class=content4><%=ars.Fields("REVENUE")%></td>
: >
: > Response.Write("<td align=""right""><Font class=""content4"">" &
: > ars.Fields("REVENUE") & "</font></td>")
: >
: > I would use this instead...
: >
: > Response.Write("<td class=""content4"">" & ars.Fields("REVENUE") &
: > "</td>")
: >
: > Add this to content4 class.
: > text-align: right;
:
: Unless you wanted to override what's in the content4 class for this
: particular instance ... :)

True, but then I'd use:
Response.Write("<td class=""content4"" style=""text-align: right"">" &
ars.Fields("REVENUE") & "</td>")

....but shouldn't he also make this change?
Response.Write("<td class=""content4"" style=""text-align: right"">" &
ars.Fields("REVENUE").Value & "</td>")

I know it's not required but isn't it the preferred way?

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top