Solved

ASP.net VB.net Table Control Double Border

Posted on 2014-03-13
4
370 Views
Last Modified: 2014-03-13
Hi

Is it possible with the ASP.net table control to format the bottom of a cell
with a double line as you would in Excel using the following code?

Selection.Borders(xlEdgeBottom).LineStyle = xlDouble
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 39926274
You can do it with CSS with something like;
td { border-bottom: double 2px black; }

Open in new window

0
 

Author Comment

by:Murray Brown
ID: 39926285
Thanks. I am a VB.net coder. Is there no way to do this with VB.net? If not, how do I manipulate the CSS you mentioned in a VB.net project?
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 39926322
The asp:Table control only lets you specify the border for the whole cell, not each individual side of the cell. To do it you need to use CSS.

Add the style into your pages head section and then set the CssClass property on each relevant cell:
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <style type="text/css">
        td.double-underline { border-bottom: double 2px black; }
    </style>
    <title></title>
</head>
<body>

    <form id="form1" runat="server">
    <div>
        <asp:Table>
            <asp:TableRow>
                <asp:TableCell CssClass="double-underline">Some content</asp:TableCell>
            </asp:TableRow>
        </asp:Table>
    </div>
    </form>

</body>
</html>

Open in new window

0
 

Author Closing Comment

by:Murray Brown
ID: 39926409
thanks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question