Click here to Skip to main content
11,927,378 members (44,514 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET
How to print multiple pages of listview with default page setting.
i want to set only 8 record in my page after that next 8 records should be print into new page and so on.
i tried so many code and css but unable to set default margine. margine which i am setting is only working for first 2- 3 pages after that records getting merge.
plz help me at this point of time i got frestrated i am tring to acheive this last 3 days but unable to do.below is css and page script which i am using for page.
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <link rel="stylesheet" type="text/css" href="../css/jquery.fancybox-1.3.4.css" media="screen" />
    <script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="../js/jquery.fancybox-1.3.4.pack.js"></script>
    <script type="text/javascript">
        function printpage() {
        .memberDetailTab td
            text-align: center;
    <div class="non-printable">
            <h1 class="non-printable">
                Print Address Slips</h1>
        <div class="control">
            <table style="margin: 0px auto; border: solid 1px #DCDCD6; width: 70px; page-break-before: always;">
                    <td class="style2">
                    <td align="center">
                        <asp:DropDownList ID="DDLprint" runat="server" OnSelectedIndexChanged="DDLprint_SelectedIndexChanged"
                            <asp:ListItem Value="0" Selected="True">Select Slip type
                            <asp:ListItem Value="1">Print All Slip
                            <asp:ListItem Value="2">Print Valid Slips
                            <asp:ListItem Value="3">Print Updated Slips
                        <asp:Button ID="Print" Text="Print Slips" runat="server" OnClick="Print_Click" />
                    <td class="style2">
    <div id="main-removed" style="overflow: auto; height: 50%; width: 100%" class="printable" />
    <asp:ListView ID="LSVAllSlips" runat="server" GroupItemCount="2" GroupPlaceholderID="groupPlaceholder1"
        ItemPlaceholderID="itemPlaceholder1" OnPagePropertiesChanged="LSVAllSlips_PagePropertiesChanged">
                <tr id="groupPlaceholder1"  runat="server" align="center">
                <td id="itemPlaceholder1"  runat="server">
                <div class="textRotate">
                    <asp:Image ID="imgUrl" runat="server" ImageUrl='<%# Eval("Image")%>' Height="10mm" /></div>
                <%--  <asp:Label ID="lblmemid" runat="server" Text='<%# Eval("MemberShipid") %>' Font-Bold="True"--%>
                <%--Font-Size="Larger" />--%>
            <td align="left" style="width: 8.5cm; height: 32.15mm; background: #dedede;">
                <asp:Label ID="lblname" runat="server" Text='<%# Eval("Name") %>' Font-Size="12px"
                    Font-Bold="true" />
                <asp:Label ID="lbladd" runat="server" Text='<%# Eval("Address") %>' Font-Size="12px" />
                <asp:Label ID="lblcity" runat="server" Text='<%# Eval("City") %>' Font-Size="12px" />,
                <asp:Label ID="lblstate" runat="server" Text='<%# Eval("State") %>' Font-Size="12px" />
                <asp:Label ID="lblpin" runat="server" Text='<%# Eval("Pincode") %>' Font-Size="12px" />
Posted 22-Mar-13 0:48am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

atul_pune 2-Apr-13 4:56am
Hello Vishal i tried this article but not getting solution
VishwaKL 3-Apr-13 3:54am
what is the error / problem you getting

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.151126.1 | Last Updated 2 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100