ASP
Problem in display with different colors
4 views
Hi,
i have the following code ,
<%
Dim iDay, iWeek, sFontColor, dictDte(31,2), intCount
strSql = "SELECT * FROM diary WHERE month(dte)= " & month(dtCurViewMonth) & " and year(dte) = " & year(dtCurViewMonth) & " order by dte"
set rs = my_conn.Execute (StrSql)
intCount= 0
' populate array with days of month
on Error resume next
do until rs.EOF
if intCount > 31 then exit do
if Day(rs("dte")) = intCount + 1 then
<%
DIM b
b = rs("a1") & vbcrlf
b = b & rs("a2") & vbcrlf
b = b & rs("b1") & vbcrlf
b = b & rs("b2") & vbcrlf
b = b & rs("c1") & vbcrlf
b = b & rs("c2") & vbcrlf
b = b & rs("d1") & vbcrlf
b = b & rs("d2") & vbcrlf
dictDte(intCount, 1) = b
rs.Movenext
Else
dictDte(intCount, 1) = " "
End If
dictDte(intCount, 2) = intCount + 1
intCount = intCount + 1
loop
%>
Now i want the fields to be diplayed in such an order that field ( a1,b1,c1,d1 ) all are bold and in one color and fields ( a2,b2,c2,d2 ) are in italic format and in another color.
where as i want the data to be stored in the same variable b because i want to display all the data in "b" in a single field.
please guide me about the syntex,
thanks in advance