Click here to Skip to main content
15,893,266 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a datalist where i m displaying 8 items for printing.I m printing two items per row.When i print a two or more than two items,the layout is perfect.but when i print single item.the layout changes and expands.How Can i fix it for single item also.
My aspx Code is as follows:

<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">









<asp:Label ID="lblwebsite" runat="server" Font-Bold="True" Text='<% # bind("website")%>'>
<asp:Label ID="Label13" runat="server" Font-Bold="True" Text="Call #">

<asp:Label ID="lblcontact" runat="server" Text='<% # bind("mobile1")%>'>
   
<asp:Label ID="Label15" runat="server" Font-Bold="True" Text="Fax #">

<asp:Label ID="lblfax" runat="server" Text='<% # bind("fax")%>'>


<asp:Label ID="lbladdress" runat="server" Text='<% # bind("address")%>' >
<asp:Label ID="lblfax1" runat="server" Font-Bold="True" Text="Ord #">

<asp:Label ID="lblorder" runat="server" text='<% # bind("orderno")%>'>
   
<asp:Label ID="lblfax2" runat="server" Font-Bold="True" Text="Dt:">

<asp:Label ID="lblvrdate" runat="server" Text='<% # bind("vr_date")%>'>

<asp:Label ID="lblfax3" runat="server" Font-Bold="True" Text="Pt:">

<asp:Label ID="lblpt" runat="server" Text='<% # bind("pname")%>' Font-Bold="False" >
   
<asp:Label ID="Label16" runat="server" Font-Bold="True" Text="Dr :">

<asp:Label ID="lbldrname" Text='<% # bind("drname")%>' runat="server" Font-Bold="False" >

<asp:Label ID="Label17" runat="server" Font-Bold="True"
Text="Rx:">
<asp:Label ID="lblorderSupplied" runat="server" Font-Bold="False" Text='<% # bind("medicine")%>'
>

<asp:Label ID="labeld" runat="server" Text="Qty:" Font-Bold="True">
<asp:Label ID="lblpack" Text='<% # bind("pack")%>' runat="server" >
<asp:Label ID="txtmfgDt" runat="server" text="x">
<asp:Label ID="lblqty" runat="server" text='<% # bind("suppquantity")%>'>

<asp:Label ID="lbldirections" Height="38PX" Text='<% # bind("directions")%>' runat="server" Font-Bold="False">
<%-- --%>

Posted
Updated 22-Nov-13 23:04pm
v6

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