Monday, 12 October 2015

Table Border Using Css In Asp.net

10/12/2015 - By Pranav Singh 0

This article will show you how you can assign the border to a table. In this I have used border and border-collapse using css.


<table width="30%" cellpadding="5" cellspacing="5" style="border: 1px solid black;border-collapse: collapse;">
                    <tr>
                        <td align="right">
                            &nbsp;</td>
                        <td align="left">
                            <asp:ValidationSummary ID="ValidationSummary1" runat="server"
                                ForeColor="#FF3300" />
                        </td>
                   </tr>
                    <tr>
                        <td align="right">
                            User Id :
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtUserId" runat="server" Width="200px"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                                ControlToValidate="txtUserId" ErrorMessage="Please enter user id"
                                style="color: #FF3300">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            Password :
                        </td>
                        <td align="left">
                            <asp:TextBox ID="txtPassword" runat="server" Width="200px" TextMode="Password"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                                ControlToValidate="txtPassword" ErrorMessage="Please enter password"
                                style="color: #FF3300">*</asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td align="center" colspan="2">
                            <asp:Button ID="btnLogin" runat="server" Text="Login"
                                onclick="btnLogin_Click" />&nbsp;&nbsp;
                            <input id="Reset1" type="reset" value="Reset" />
                        </td>
                    </tr>
                     <tr>
                        <td align="center" colspan="2">
                            <br />
                        </td>
                    </tr>
                </table>

In this have a look of the below code which we have used for border.

border: 1px solid black;border-collapse: collapse;

Here is the output.


Tags: ,
About the Author

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Get Updates

Subscribe to our e-mail newsletter to receive updates.

Share This Post

0 comments:

Please let me know your view

Free Ebooks


About Us

We are the group of people who are expertise in different Microsoft technology like Asp.Net,MVC,C#.Net,VB.Net,Windows Application,WPF,jQuery,Javascript,HTML. This blog is designed to share the knowledge.

Contact Us

For writing article in this website please send request by your

GMAIL ID: dotnetpools@gmail.com

Bugs and Suggestions

As we all know that this website is for sharing knowledge and providing proper solution. So while reading the article is you find any bug or if you have any suggestion please mail us at contact@aspdotnet-pools.com.

Partners


Global Classified : Connectseekers.com
© 2014 aspdotnet-pools.com Designed by Bloggertheme9.
back to top