# Region paging class
/// <Summary>
/// Pagination
/// </Summary>
Public class SplictPage
{
/// <Summary>
/// Content Paging
/// </Summary>
/// <Param name = "content"> the content marker is a paging id </param>
/// <Param name = "Id"> Id </param>
/// <Returns> </returns>
Public static string bind (string content, string Id)
{
String [] temp = content. Trim (). Split ('alipay ');
String html = "<Table> <tr> ";
Int page;
If (system. Web. httpcontext. Current. Request. querystring ["page"] = NULL)
{
HTML + = "<TD>" + temp [0] + "</TD> </tr> </table> ";
}
Else
{
If (SFL. forsdk. Validate. isint (system. Web. httpcontext. Current. Request. querystring ["page"])
{
Page = int. parse (system. Web. httpcontext. Current. Request. querystring ["page"]);
}
Else
{
System. Web. HttpContext. Current. Response. Write ("<script> alert ('input parameter error! '); History. back (); </script> ");
System. Web. HttpContext. Current. Response. End ();
Page = 0;
}
If (int. Parse (System. Web. HttpContext. Current. Request. QueryString ["page"])> temp. Length)
{
System. Web. HttpContext. Current. Response. Write ("<script> alert ('the input parameter exceeds the maximum page number! '); History. back (); </script> ");
System. Web. HttpContext. Current. Response. End ();
Page = 0;
}
Html + = "<td>" + temp [page-1] + "</td> </tr> </table> ";
}
String thispage = "";
If (temp. Length> 1)
{
Thispage = "<table align = center> <tr> <td> [<a href =? Kid = "+ Id +" & page = 1> homepage </a>] </td> ";
For (int I = 0; I <= temp. Length-1; I ++)
{
Thispage + = "<td> [<a href =? Kid = "+ Id +" & page = "+ (I + 1) +"> "+ (I + 1) +" </a>] </td> ";
}
Thispage + = "<td> <a href =? Kid = "+ Id +" & page = "+ (temp. Length) +"> [last page] </td> </tr> </table> ";
}
Return html + thispage;
}
}
# Endregion