Changing the color of a border in an HTML table

C

Chris Davoli

Environment: VS2005, sql server 2000, Win XP
I put runat=server on a regular HTML table. Then instead of setting the
style in the html I want to dynamically change the style of the html table
border color. We'll it won't let you change the OUTER border color unless you
use the styles attribute in the html, but even though it has runat=server, it
won't let you change the style attribute in the codebehind. I can change
using style sheet, but can't change the style sheet.

Any ideas on how to change the border color dynamically?
 
M

marss

Any ideas on how to change the border color dynamically?

Maybe it is hat you are looking for:

..aspx file:
<table id="tbl" runat="server"><tr>...</tr></table>
..cs file:
tbl.Style["border"] = "solid 1px red";

Mykola
 

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

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top