Solved

ASP.net VB.net Table Control Double Border

Posted on 2014-03-13
4
362 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:murbro
  • 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:murbro
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:murbro
ID: 39926409
thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

820 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