Html - Button Color Question!

Herry Markowitz

Well-known member
Joined
Oct 22, 2015
Messages
46
Programming Experience
1-3
Hi beautiful people,
Following code is okey.
VB.NET:
.htmlbody = _  "<html>" & _
                    "<body>" & _
                            "<table width=600 border=0 align=left cellspacing=0 cellpadding=0" & _
                                "<tr>" & _
                                    "<td width=600 [COLOR=#ff0000]bgcolor=Blue[/COLOR]" & _
                                    "Dear,<br>" & _
                                    Title & "<br><br>" & _
                                    "Best Regards.<br>" & _
                                    Sender & "<br><br>" & _
                                    "</td>" & _
                                "</tr>" & _
                            "</table>" & _
                    "</body>" & _
                "</html>"

When I replace this line
VB.NET:
bgcolor=Blue
with this
VB.NET:
bgcolor=Button9.BackColor.Name
code doesnt change the color.
Any idea?
 
Last edited:
What's with all the speech marks in your code? That doesn't look right. I also don't get why every line of code ends with the ampersands and underscores. I would say you need a speech mark at the beginning of the word Blue.
 
Hi John,
Following code is okey.
VB.NET:
<!DOCTYPE html><html>
<body>
<table style="width:100%">
  <tr>
    <td [COLOR=#ff0000]bgcolor=Blue[/COLOR]>Jill</td>
    <td>Smith</td>        
    <td>50</td>
  </tr>
</table>
</body>
</html>

Following code is not okey. Do you know why?
VB.NET:
<!DOCTYPE html><html>
<body>
<table style="width:100%">
  <tr>
    <td [COLOR=#ff0000]bgcolor=Button9.BackColor.Name[/COLOR]>Jill</td>
    <td>Smith</td>        
    <td>50</td>
  </tr>
</table>
</body>
</html>
 
Is the Button9.BackColour.Name code meant to reference a css file? I can't see any reference to it, if that is the case.
 
No css..
You have a button in the your project and you want to get that button color... That is the simple question...
 
Last edited:
Solved.

HTML:
<!DOCTYPE html><html>
<body>
<table style="width:100%">
<tr>
<td bgcolor= " & Button9.BackColor.Name & ">Jill</td>
<td>Smith</td> 
<td>50</td>
</tr>
</table>
</body>
</html>
 
Back
Top