Try our conversational search powered by Generative AI!

Paging for PageList in EpiServer



I initialize paging control for page list in Page_Load:


MyPageList.Paging = true;
MyPageList.PagingControl = new PagingControl();
MyPageList.PagesPerPagingItem = (int)CurrentPage.Property[Constants.Properties.MainListCount].Value;


This code generates paging control only after my page list, but I need to place it after and before my list of page links. 

Anybody knows how can I do it?



Nov 01, 2010 10:02

Reflector and inherit from PageList and add a header template

Nov 01, 2010 10:25

Could you provide me with some code example, please?

Nov 01, 2010 10:33

Another way is to render the pagelist pager into your own streamwriter and display it wherever you want. I think I have som code lying around somewhere I will check.

Something like the below should work. Mycontrol must be replaced with the pagecontrol of the pagelist. Then you could use a literal to display it to the user.

StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);

using (HtmlTextWriter writer = new HtmlTextWriter(sw))

string html = sb.ToString();

Edited, Nov 01, 2010 14:30


Nov 03, 2010 10:37
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.