Generic list of Objects, passed through a HTML text writer class to output html. Now trying to implement paging
<p>I have a list of objects which have been taken form a stored procedure. I then take this list pass it through a method I created which wraps it in HTML and then out puts to the webform. </p>

<p>I'm looking to create paging for this list. I have stored the list in a session and have two buttons ( next and previous ) I'm using LINQ to skip and take form the list on each button click. </p>

<p><strong>Button Click</strong></p>

<pre><code>protected void lnkNext_Click(object sender, EventArgs e)
{
    ListOfAdvertAndUsers = (List&lt;Advert_User&gt;)Session["list"];

    var list = from item in ListOfAdvertAndUsers select item;

    var pgNo = 1;
    var pgRec = 6;

    list = list.Skip(pgRec * pgNo).Take(pgRec).ToList();

    ListOfAdvertAndUsers = list.ToList();

    PopulateData(ListOfAdvertAndUsers);
}
</code></pre>