examples of using page break always in asp.net RRS feed

  • Question

  • User1535982600 posted


    Any body pls tell live example of using page break always in asp.net

    Monday, August 29, 2011 11:20 AM

All replies

  • User-110526006 posted



    Wednesday, November 23, 2011 12:34 AM
  • User347430248 posted

    Hi greeny,

    you can try to do something like below.

    <STYLE TYPE='text/css'>
    P.pagebreakhere {page-break-before: always}

    Then place the following code in the BODY of the html where you want the pagebreak:

    <P CLASS="pagebreakhere">
    Monday, September 5, 2016 9:17 AM
  • User-691209617 posted

    Use below sample code,

    <head runat="server">
            @media print
                    display: none;

    And add below code after bind data to Gridview

     GridView1.UseAccessibleHeader = true;
            GridView1.HeaderRow.TableSection = TableRowSection.TableHeader;

    dd below sample code on GridView1_RowDataBound event.

       if (e.Row.RowType == DataControlRowType.DataRow)
                tempcounter = tempcounter  + 1 ;
                if (tempcounter == 10)
                    e.Row.Attributes.Add("style", "page-break-after: always;");
                    tempcounter = 0;


    Thursday, November 10, 2016 7:39 PM
  • User-2054057000 posted

    By default when you put something inside a paragraph (p) or a div then they automatically comes down to the next line. This is an example of page break which you should use.

    Sunday, March 10, 2019 9:54 AM