public void ShowLatestTextNews(int?MaxLen) { strPageNo = Request["PageNo"]; try { PageNo = Convert.ToInt32(strPageNo); } catch { } if (PageNo == 0) { PageNo = 1; } PageNo = 1; BOLNews NewsBOL = new BOLNews(); if (_newsType == NewsTypes.RandNews) { IQueryable <vRandTextNews> ItemList = NewsBOL.GetLatestTextNews(_pageSize, PageNo, MaxLen); ItemCount = ItemList.Count(); rptNewsList.DataSource = ItemList; rptNewsList.DataBind(); } else { rptNewsList.DataSource = NewsBOL.GetMostVisitedTextNews(_pageSize, PageNo, MaxLen); rptNewsList.DataBind(); } }