private void FormatFourNum(int pageCount) { if (PageIndex > 1) { doc.Set("labFirst", SetType.Href, URLPara.Replace("{0}", "1")); doc.Set("labPrev", SetType.Href, URLPara.Replace("{0}", (PageIndex - 1).ToString())); } if (PageIndex < pageCount) { doc.Set("labNext", SetType.Href, URLPara.Replace("{0}", (_PageIndex + 1).ToString())); doc.Set("labLast", SetType.Href, URLPara.Replace("{0}", pageCount.ToString())); } }
private void SetNumLink(int start, int end) { string numLinks = string.Empty; System.Xml.XmlNode node = doc.GetByID("labForNum"); if (node != null) { string activeCss = doc.GetAttrValue(node, "active"); System.Xml.XmlNode newNode = null; for (int i = end; i >= start; i--) { doc.Set("labNum", SetType.A, i.ToString(), URLPara.Replace("{0}", i.ToString())); newNode = node.Clone(); if (i == PageIndex && activeCss.Length > 0) { doc.Set(newNode, SetType.Class, activeCss); } doc.InsertAfter(newNode, node); } doc.Remove(node); } }