|
一、创建一个类
public class Navigation
 ...{
private string _siteName, _siteURL;
public Navigation(string siteName, String siteURL)
 ...{
_siteName = siteName;
_siteURL = siteURL;
}
 public string SiteName ...{ get ...{ return _siteName; } }
 public string SiteURL ...{ get ...{ return _siteURL; } }
}

二、分页
dbAccess mydb = new dbAccess();
mydb.SqlStr = "select count(bookid) as totalid from szhotline where bkcity='" + bkcity + "' and atype=" + atype;
DataSet dsTotal = mydb.readTable("szhotline");
int countTotal = Convert.ToInt32(dsTotal.Tables["szhotline"].Rows[0]["totalid"].ToString()); //总记录数
int totalPage = 0; //总页数
[1] [2] [3] 下一页 |