C# .NET - Pagination using string builder in C#

Asked By malar malar on 13-Mar-13 08:01 AM
Hi i wan to incorporate pagination in the below code. Kindly help.  Thanks in advance.

Private void BindQA()
{
dataset dsGet=null;
dsGet=obj.Getdetails(objplfaq);//
stringbuilder strBuilder=new stringbuilder();

if(dsGet.tables[0].rows.count > 0)
{
strBuilder.Append("<table><tr><td></td></tr>");

}
int intcnt=0;
for( int i=0;i<dsGet.tables[0].rows.count;i++)
{
   string  strQues="",strAns="",strSearchtext="";
  strQues=dsGet.Tables[0].rows[i]["Q_Desc"].tostring();
  strAns=dsGet.Tables[0].rows[i]["Q_Desc"].tostring();

if(i>5)
{
  strBuilder.Append("<tr><td><a href='#' name ='"+intcnt.tostring()+"'</a>Q:</td>");
    strBuilder.Append("<td> +strQues+"</td></tr>");
    strBuilder.Append("<tr><td>+strAns+"</td></tr>");
}  
}
strBuilder.Append("</table>");
sphtml.InnerHtml=strbuilder.tostring();
}