Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. ASP.NET Tables tr and td

ASP.NET Tables tr and td

Scheduled Pinned Locked Moved ASP.NET
questioncsharpcssasp-nethelp
14 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sudevsu
    wrote on last edited by
    #1

    Is it possible to create a table with one row having 8 td(s) second row having 12 td(s)? I know about Bootstrap. But I have requirement where I should use only classic ASP.NET. I know its silly question for all the experts in here. But it definitely helps people like me.

    Your help is much appreciated. Thanks Happy Coding!

    Z 1 Reply Last reply
    0
    • S sudevsu

      Is it possible to create a table with one row having 8 td(s) second row having 12 td(s)? I know about Bootstrap. But I have requirement where I should use only classic ASP.NET. I know its silly question for all the experts in here. But it definitely helps people like me.

      Your help is much appreciated. Thanks Happy Coding!

      Z Offline
      Z Offline
      ZurdoDev
      wrote on last edited by
      #2

      Sure. You'll need to use colspan="2" or something like that on some of the tds in the first row so that things will line up.

      There are only 10 types of people in the world, those who understand binary and those who don't.

      S 1 Reply Last reply
      0
      • Z ZurdoDev

        Sure. You'll need to use colspan="2" or something like that on some of the tds in the first row so that things will line up.

        There are only 10 types of people in the world, those who understand binary and those who don't.

        S Offline
        S Offline
        sudevsu
        wrote on last edited by
        #3

        can you elaborate it Ryan? or Can you provide any example for it.

        Your help is much appreciated. Thanks Happy Coding!

        Z 1 Reply Last reply
        0
        • S sudevsu

          can you elaborate it Ryan? or Can you provide any example for it.

          Your help is much appreciated. Thanks Happy Coding!

          Z Offline
          Z Offline
          ZurdoDev
          wrote on last edited by
          #4

          Elaborate? I'm not sure. colspan is a very simple concept. Perhaps these links will help: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_td_colspan[^] - first 3 rows have 2 columns (tds) last row only has 1. http://www.w3schools.com/tags/att_td_colspan.asp[^]

          There are only 10 types of people in the world, those who understand binary and those who don't.

          S 2 Replies Last reply
          0
          • Z ZurdoDev

            Elaborate? I'm not sure. colspan is a very simple concept. Perhaps these links will help: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_td_colspan[^] - first 3 rows have 2 columns (tds) last row only has 1. http://www.w3schools.com/tags/att_td_colspan.asp[^]

            There are only 10 types of people in the world, those who understand binary and those who don't.

            S Offline
            S Offline
            sudevsu
            wrote on last edited by
            #5

            That explains, thanks. It may be Simple. But I don't know anything in DotNet Learning new things everyday. And I thank all the experts who are helping me in understanding it. The links provided by you helps me. Thank you

            Your help is much appreciated. Thanks Happy Coding!

            Z 1 Reply Last reply
            0
            • Z ZurdoDev

              Elaborate? I'm not sure. colspan is a very simple concept. Perhaps these links will help: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_td_colspan[^] - first 3 rows have 2 columns (tds) last row only has 1. http://www.w3schools.com/tags/att_td_colspan.asp[^]

              There are only 10 types of people in the world, those who understand binary and those who don't.

              S Offline
              S Offline
              sudevsu
              wrote on last edited by
              #6

              Here is my code, Can you make it look with proper alignments.

              <table width="100%" cellspacing="3" cellpadding="3">
              <tr class="RowOdd">
              <td width="7.5%" class="Labels">Year</td>
              <td width="16.5%" ><asp:DropDownList ID="ddlYear" runat="server" AutoPostBack="true" Width="100%">
              asp:ListItem2014</asp:ListItem>
              </asp:DropDownList></td>
              <td width="1%"><asp:RequiredFieldValidator ID="Ref16" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="ddlYear" ValidationGroup="Required" /></td>
              <td width="7.5%" class="Labels">Make</td>
              <td width="16.5%"><asp:DropDownList ID="ddlMake" runat="server" AutoPostBack="true" Width="100%">
              asp:ListItemNissan</asp:ListItem>
              </asp:DropDownList>
              </td>
              <td width="1%" ><asp:RequiredFieldValidator ID="Ref17" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="ddlMake" ValidationGroup="Required" /></td>
              <td width="7.5%" class="Labels">Model</td>
              <td width="16.5%"><asp:DropDownList ID="ddlModel" runat="server" AutoPostBack="true" Width="100%">
              asp:ListItemAltima</asp:ListItem>
              </asp:DropDownList></td>
              <td width="1%" > <asp:RequiredFieldValidator ID="Ref18" runat="server" ErrorMessage="*" ForeColor="Red" ControlToValidate="ddlModel" ValidationGroup="Required"/></td>
              <td width="7.5%" class="Labels">Vehicle Identification</td>
              <td width="16.5%"><asp:TextBox ID="txtVIN" runat="server" Width="100%" /></td>
              <td width="1%"> <asp:RequiredFieldValidator ID="Ref19" runat="server" ErrorMessage="*" ForeC

              1 Reply Last reply
              0
              • S sudevsu

                That explains, thanks. It may be Simple. But I don't know anything in DotNet Learning new things everyday. And I thank all the experts who are helping me in understanding it. The links provided by you helps me. Thank you

                Your help is much appreciated. Thanks Happy Coding!

                Z Offline
                Z Offline
                ZurdoDev
                wrote on last edited by
                #7

                sudevsu wrote:

                But I don't know anything in DotNet

                Not a problem. td is actually html and not .net.

                There are only 10 types of people in the world, those who understand binary and those who don't.

                S 2 Replies Last reply
                0
                • Z ZurdoDev

                  sudevsu wrote:

                  But I don't know anything in DotNet

                  Not a problem. td is actually html and not .net.

                  There are only 10 types of people in the world, those who understand binary and those who don't.

                  S Offline
                  S Offline
                  sudevsu
                  wrote on last edited by
                  #8

                  See I didn't even about that... :laugh: Yeah thanks for the correction

                  Your help is much appreciated. Thanks Happy Coding!

                  1 Reply Last reply
                  0
                  • Z ZurdoDev

                    sudevsu wrote:

                    But I don't know anything in DotNet

                    Not a problem. td is actually html and not .net.

                    There are only 10 types of people in the world, those who understand binary and those who don't.

                    S Offline
                    S Offline
                    sudevsu
                    wrote on last edited by
                    #9

                    Ryan, If you find some time Please check the code which I pasted in the reply of this thread and help me out in alignments of controls with colspan option.

                    Your help is much appreciated. Thanks Happy Coding!

                    Z 1 Reply Last reply
                    0
                    • S sudevsu

                      Ryan, If you find some time Please check the code which I pasted in the reply of this thread and help me out in alignments of controls with colspan option.

                      Your help is much appreciated. Thanks Happy Coding!

                      Z Offline
                      Z Offline
                      ZurdoDev
                      wrote on last edited by
                      #10

                      How do you need help? It's up to you how the table ends up looking. Refer back to the link I posted with the example, http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_td_colspan[^]. You could remove the colspan="2" on the last row but it just looks weird, to me at least. You are in control of how you want the 2 rows to look.

                      There are only 10 types of people in the world, those who understand binary and those who don't.

                      S 1 Reply Last reply
                      0
                      • Z ZurdoDev

                        How do you need help? It's up to you how the table ends up looking. Refer back to the link I posted with the example, http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_td_colspan[^]. You could remove the colspan="2" on the last row but it just looks weird, to me at least. You are in control of how you want the 2 rows to look.

                        There are only 10 types of people in the world, those who understand binary and those who don't.

                        S Offline
                        S Offline
                        sudevsu
                        wrote on last edited by
                        #11

                        Well, If you look at the code I posted in the thread. there are couple of this that is bothering me. Vehicle Identification label and its Textbox are somehow not in place and Credit disallowed radio buttons scrap and return collect are just going out td. Rest all are in proper alignment. So I need help in arranging those properly. I tried multiple ways but nothing has worked for me and so I need expert help.

                        Your help is much appreciated. Thanks Happy Coding!

                        Z 1 Reply Last reply
                        0
                        • S sudevsu

                          Well, If you look at the code I posted in the thread. there are couple of this that is bothering me. Vehicle Identification label and its Textbox are somehow not in place and Credit disallowed radio buttons scrap and return collect are just going out td. Rest all are in proper alignment. So I need help in arranging those properly. I tried multiple ways but nothing has worked for me and so I need expert help.

                          Your help is much appreciated. Thanks Happy Coding!

                          Z Offline
                          Z Offline
                          ZurdoDev
                          wrote on last edited by
                          #12

                          I would suggest removing the width on the tds and let them autosize, for starters at least, until you can get it lined up properly. It's really hard to read in that format but you don't need expert help. This should be relatively simple since you just have 2 rows. Think of an excel spreadsheet. if things are lining up just count how many tds there are and make them match however you want.

                          There are only 10 types of people in the world, those who understand binary and those who don't.

                          S 1 Reply Last reply
                          0
                          • Z ZurdoDev

                            I would suggest removing the width on the tds and let them autosize, for starters at least, until you can get it lined up properly. It's really hard to read in that format but you don't need expert help. This should be relatively simple since you just have 2 rows. Think of an excel spreadsheet. if things are lining up just count how many tds there are and make them match however you want.

                            There are only 10 types of people in the world, those who understand binary and those who don't.

                            S Offline
                            S Offline
                            sudevsu
                            wrote on last edited by
                            #13

                            It is not just two rows. I think you did not see my code in the thread. Look at the last message of this Thread.

                            Your help is much appreciated. Thanks Happy Coding!

                            Z 1 Reply Last reply
                            0
                            • S sudevsu

                              It is not just two rows. I think you did not see my code in the thread. Look at the last message of this Thread.

                              Your help is much appreciated. Thanks Happy Coding!

                              Z Offline
                              Z Offline
                              ZurdoDev
                              wrote on last edited by
                              #14

                              Regardless of how many rows, all you're doing is stacking blocks. You decide how you want it to look. Each cell (td) is a block and it can be wider than the one above or below it, it's up to you.

                              There are only 10 types of people in the world, those who understand binary and those who don't.

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • World
                              • Users
                              • Groups