我有一个数据列表显示8个项目用于打印。我每行打印两个项目。当我打印两个或两个以上的项目时,布局是完美的。但是当我打印单个项目时,布局会发生变化。 expands.How我可以为单个项目修复它。
<asp:DataList ID="datalis1" runat="server" RepeatDirection="Horizontal"
BorderStyle="NotSet" CellPadding="0" CellSpacing="5" RepeatLayout="Table"
RepeatColumns="2" >
<ItemStyle />
<ItemTemplate>
<asp:Panel ID="Panel1" runat="server" CssClass="boxdiv">
<table style="width: 94%;" align="center" cellspacing="0" cellpadding="0" border="0" class="table1">
<tr style="height:2px;">
<td colspan="0" rowspan="0" height='2px'>
<asp:Label ID="lblwebsite" runat="server" Font-Bold="True" Text='<% # bind("website")%>'>
</asp:Label>
</td>
</tr>
<tr style="height:2px;" >
<td colspan="0" rowspan="0" height='2px'>
<asp:Label ID="Label13" runat="server" Font-Bold="True" Text="Call #">
</asp:Label>
<asp:Label ID="lblcontact" runat="server" Text='<% # bind("mobile1")%>'>
</asp:Label>
<asp:Label ID="Label15" runat="server" Font-Bold="True" Text="Fax #">
</asp:Label>
<asp:Label ID="lblfax" runat="server" Text='<% # bind("fax")%>'>
</asp:Label>
</td>
</tr>
<tr style="height:2px;">
<td colspan="0" rowspan="0" height='2px' >
<%--<asp:Label ID="lblfax0" runat="server" Font-Bold="True" Text="Address :">
</asp:Label>--%>
<asp:Label ID="lbladdress" runat="server" Text='<% # bind("address")%>' ></asp:Label>
</td>
</tr>
<tr style="height:4px;">
</tr>
<tr style="height:4px;">
</tr>
<tr style="height:2px;">
<td height='2px' >
<asp:Label ID="lblfax1" runat="server" Font-Bold="True" Text="Ord #">
</asp:Label>
<asp:Label ID="lblorder" runat="server" text='<% # bind("orderno")%>'>
</asp:Label>
<asp:Label ID="lblfax2" runat="server" Font-Bold="True" Text="Dt:">
</asp:Label>
<asp:Label ID="lblvrdate" runat="server" Text='<% # bind("vr_date")%>'>
</asp:Label>
</td>
</tr>
<tr >
<td height='2px' >
<asp:Label ID="lblfax3" runat="server" Font-Bold="True" Text="Pt:">
</asp:Label>
<asp:Label ID="lblpt" runat="server" Text='<% # bind("pname")%>' Font-Bold="False" >
</asp:Label>
<asp:Label ID="Label16" runat="server" Font-Bold="True" Text="Dr :">
</asp:Label>
<asp:Label ID="lbldrname" Text='<% # bind("drname")%>' runat="server" Font-Bold="False" >
</asp:Label>
</td>
</tr>
<tr style="height:4px;" >
</tr>
<tr style="height:4px;" >
</tr>
<tr >
<td height='2px'>
<asp:Label ID="Label17" runat="server" Font-Bold="True"
Text="Rx:"></asp:Label>
<asp:Label ID="lblorderSupplied" runat="server" Font-Bold="False" Text='<% # bind("medicine")%>'
></asp:Label> <br />
<asp:Label ID="labeld" runat="server" Text="Qty:" Font-Bold="True"></asp:Label>
<asp:Label ID="lblpack" Text='<% # bind("pack")%>' runat="server" ></asp:Label>
<asp:Label ID="txtmfgDt" runat="server" text="x"> </asp:Label>
<asp:Label ID="lblqty" runat="server" text='<% # bind("suppquantity")%>'></asp:Label>
</td>
</tr>
<tr style="height:4px;" >
</tr>
<tr style="height:4px;" >
</tr>
<tr >
<td height='2px'>
<%-- <asp:Label ID="Label18" runat="server" Font-Bold="True"
Text="Directions:"></asp:Label>--%>
<%-- <div style="text-overflow : ellipsis; overflow: hidden; overflow-y: hidden; height:38px">--%>
<asp:Label ID="lbldirections" Height="38PX" Text='<% # bind("directions")%>' runat="server" Font-Bold="False"></asp:Label>
<%-- </div>--%>
</td>
</tr>
<tr >
<td height='2px'>
<%-- <asp:Label ID="lblmfg" runat="server" text="Mfg:"></asp:Label>--%>
</td>
</tr>
</table>
</asp:Panel>
</ItemTemplate>
</asp:DataList>