Solved

ASP.net VB.net Table Control Double Border

Posted on 2014-03-13
4
357 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

773 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