Session is still the same after edited
<p>debug message is always the following after pressed next button many times,
it can go from page 1 to page 2 but can not go to page 3</p>

<p>finally i find the problem is </p>

<pre><code>Session["jobsearch"] = js;
</code></pre>

<p>it has saved but next time i retrieve this, it is like not saved before</p>

<p>debug message</p>

<pre><code>before js.CurrentPageNo=1
after js.CurrentPageNo=2
js.StartIndex=13
js.PageSize=24
js.TotalPageFound=5
js.CurrentPageNo=2
rowPerPage=12
before js.CurrentPageNo=1
after js.CurrentPageNo=2
js.StartIndex=13
js.PageSize=24
js.TotalPageFound=5
js.CurrentPageNo=2
rowPerPage=12


js.StartIndex=13js.PageSize=24js.TotalPageFound=5js.CurrentPageNo=2rowPerPage=12
js.StartIndex=13js.PageSize=24js.TotalPageFound=5js.CurrentPageNo=2rowPerPage=12
js.StartIndex=13js.PageSize=24js.TotalPageFound=5js.CurrentPageNo=2rowPerPage=12
js.StartIndex=13js.PageSize=24js.TotalPageFound=5js.CurrentPageNo=2rowPerPage=12
</code></pre>

<p>next button code</p>

<pre><code>protected void btnNext_OnClick(object sender, EventArgs e)
    {
        if (Session["jobsearch"] != null)
        {
            JobSearch js = (JobSearch)Session["jobsearch"];
            js.CurrentPageNo++;
            js.StartIndex = js.StartIndex + rowPerPage;
            js.PageSize = js.PageSize + rowPerPage;

            Session["jobsearch"] = js;
            if (jobResultsTable.DocumentContent.Contains("Jobs In Engineering"))
            {
                Session["jobsearch2"] = "Jobs In Engineering";
            }
            else
            {
                Session["jobsearch2"] = "Jobs In IT";
            }

            System.IO.File.AppendAllText(@"D:\Debug.txt", "js.StartIndex=" + js.StartIndex);
            System.IO.File.AppendAllText(@"D:\Debug.txt", "js.PageSize=" + js.PageSize);
            System.IO.File.AppendAllText(@"D:\Debug.txt", "js.TotalPageFound=" + js.TotalPageFound);
            System.IO.File.AppendAllText(@"D:\Debug.txt", "js.CurrentPageNo=" + js.CurrentPageNo);
            System.IO.File.AppendAllText(@"D:\Debug.txt", "rowPerPage=" + rowPerPage);

            GetJobSearchBOResult(js.StartIndex, js.PageSize, js.JobType, js.JobCountry, js.Keywords);

            ShowButton(js.CurrentPageNo, js.TotalPageFound);

            ltrPageInfo.Text = "Page " + js.CurrentPageNo + " of " + js.TotalPageFound.ToString() + "&lt;br/&gt; Total Record(s) Found: " + TotalJobFound;
        }
    }
</code></pre>
