Click here to Skip to main content
15,883,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,

I was working on a asp.net web application using c#.

Where i'm using Repeater in which i have a web user control,
in web user control i have a table.

after each web user control in a repeater, its taking some 10px of height...
i have condensed the table, but its still take more height for each row.

Can anyone help me, how can i squeeze the height of each row.

Code:

 <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <asp:Repeater ID="DailyReportRepeater" runat="server">
                                    <HeaderTemplate>
                                        <table class="table table-bordered table-condensed BoxShadow" style="padding: 0; margin: 0;">
                                            <thead>
                                                <tr>
                                                    <th align="center" style="color: White;" class="ColorHeader">
                                                        <center>
                                                            <h4 style="color: white;">
                                                                <asp:Label ID="lbltopic" runat="server" Text="TOPIC"></asp:Label>
                                                            </h4>
                                                        </center>
                                                    </th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <tr style="height: 5;">
                                            <td style="height: 5;background-color: #C0C0C0;">
                                                <center>
                                                    <h5 style="color: Black;">
                                                        <asp:Label ID="Label1" runat="server" Text='<%# Eval("UnitDepartmentName") %>' Font-Bold="true"></asp:Label>
                                                        <asp:Label ID="lbldid" runat="server" Text='<%# Eval("UnitDepartmentID") %>' Visible="false"></asp:Label>
                                                    </h5>
                                                </center>
                                            </td>
                                        </tr>
                                        <tr style="height: 5;">
                                            <td style="height: 5;">
                                                <uc1:DailyReportUnitControl ID="DailyReportUnitControl1"  runat="server" />
                                            </td>
                                        </tr>
//Get Empty row... like white space
                                    </ItemTemplate>
                                    <FooterTemplate>
                                    <tr>
                                        <td style="background-color: #C0C0C0;">
                                                <center>
                                                    <h4 style="color: Black;">
                                                        <asp:Label ID="Label1" runat="server" Text="WorkShop" Font-Bold="true"></asp:Label>
                                                    </h4>
                                                </center>
                                            </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <uc2:WorkshopUserControl ID="WorkshopUserControl1"  runat="server" />
                                        </td>
                                    </tr>
                                    <tr>
                                    <td align="center"  style="background-color: #C0C0C0;">
                                    <center>
                                    "color: rgba(0, 0, 0, 1)">Prepared By
                                        <asp:TextBox ID="TextBox1" Width="300px" runat="server"></asp:TextBox>
                                    </center></td>
                                    </tr>
                                        </tbody> </table>
                                    </FooterTemplate>
                                </asp:Repeater>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="DailyReportRepeater" />
                            </Triggers>
                        </asp:UpdatePanel>
                    </ContentTemplate>


Thanks
Posted
Updated 3-Sep-14 6:28am
v2
Comments
Sergey Alexandrovich Kryukov 3-Sep-14 12:34pm    
CSS.
—SA

Give Margin-bottom or top for repeater control
 
Share this answer
 
Try by setting the border-spacing[^] to 0.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900