Bootstrap with Asp:Repeater

I am trying to use bootstrap with Asp:Repeater to have space between the columns. However it does not work

                              <div class="row">
                                    <div class="col-md-12">
                                        <asp:Repeater ID="myRepeater" runat="server">
                                        <HeaderTemplate>
                                            <table class="table table-bordered table-striped">
                                                <tr>
                                                    <th class="col-md-4">ID</th>
                                                    <th class="col-md-8">Business Name</th>
                                                </tr>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                                <tr>
                                                    <td><%# Eval("BusinessID") %></td>
                                                    <td><%# Eval("BusName") %></td>
                                                </tr>
                                        </ItemTemplate>
                                        <FooterTemplate>
                                             </table>
                                        </FooterTemplate>
                                        </asp:Repeater>   
                                     </div>                            
							    </div> 

Open in new window

LVL 1
RecipeDanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MrunalCommented:
Hi
How is it currently looking like ?

If it is not taking full width then try by adding width attribute with value as 100% to table.
0
Julian HansenCommented:
<div class="col-md-12">

Open in new window

The above is a full width column - so you will only have one per row - what was your intention here?
0
RecipeDanAuthor Commented:
For example its is how the data looks now

ID           Business Name
24Dan's Pizza & Pasta

Is there a way I can make it look like this:

ID         Business Name
24         Dan's Pizza & Pasta
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Julian HansenCommented:
You could do something like this. I am operating in the dark here as I have no sight of your code or your business requirements so this may not be the best approach but given the information provided this should do what you want.
<div class="row">
  <div class="col-md-6">ID</div>
   <div class="col-md-6">Business Name</div>
</div>
<div class="row">
  <div class="col-md-6">24</div>
   <div class="col-md-6">Dan's Pizza & Pasta</div>
</div>

Open in new window

0
RecipeDanAuthor Commented:
@Julian you would not use a table instead use div in a Asp:Repeater?
0
Julian HansenCommented:
Are you asking if you should use a table rather - you can. Rule of thumb is tables is for tabular data not for layout also tables can present some difficulties in responsive design - with the above approach you can build your grid to collapse responsively out of the box.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.