Paging for PageList in EpiServer

Vote:
 

Hi!

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?

Thanks! 

 

#45134
Nov 01, 2010 10:02
Vote:
 

Reflector and inherit from PageList and add a header template

#45136
Nov 01, 2010 10:25
Vote:
 

Could you provide me with some code example, please?

#45137
Nov 01, 2010 10:33
Vote:
 

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))
{
myControl.RenderControl(writer);
}

string html = sb.ToString();

#45147
Edited, Nov 01, 2010 14:30
Vote:
 

Thanks!

#45230
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.