Click here to Skip to main content
15,894,825 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends,
In my webpage to display list of record,i am creating a table dynamically using string builder like
C#
foreach (var item in query)
 {
   str.Append("<tr>");
   str.Append("<td class='td2'>" +item.FirstName+" "+item.MiddleName+" "+item.LastName + "</td>");
   str.Append("<td align='center' class='td2'>" + item.CasteCode + "</td>");
   str.Append("<td align='center' class='td2'>" + item.TotalRating + "</td>");
   str.Append("<td align='center' class='td2'>" + item.GeneralRank + "</td>");
   str.Append("<td align='center' class='td2'>" + item.CasteRank + "</td>");
   str.Append("<td class='td2'>" + item.Email + "</td>");
   str.Append("<td align='center' class='td2'>" + item.MobileNo + "</td>");
   str.Append("</tr>");
 }


now the problem is if the data is increases,length of the table is increases so i want to do paging in it like gridview or datalist.
i have option to do it in gridview or datalist,but i want to do paging in dynamically created table to create something new.
any idea how to do it or any supportive link that will help me to do this.
Thanks..!!
Posted

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900