Solved

ASP.net VB.net Table Control Double Border

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now