SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We've realised that XsltListViewWebPart can render content in two different modes.

1) if we add XsltListViewWebPart by SharePoint Designers on aspx page - we have plain html render on the page 2) if we use XsltListViewWebPart by c# code on custom aspx page (set ListIs and ViewId) - we have some js script on page which asynch load and build UI

Because of this difference we have problems with our custom aspx page with XsltListViewWebPart in modal dialog mode (we show them with SP.UI.ModalDialog.showModalDialog). SP.UI.ModalDialog.showModalDialog can't calculate and get right height for page with XsltListViewWebPart in case (2) - cause it builds with js but everything is OK in case (1).

So, we've look at XsltListViewWebPart control in our aspx page in debug and realised that it have just two controls inside - SPDataSource and literal control with js code.

Is there any solution for render XsltListViewWebPart as plain html code not as some js+asyncg load?

share|improve this question
Can you share or point out to your solution? – diogoxluis May 20 '13 at 15:44
up vote 1 down vote accepted

Ok, we've found XsltListViewWebPart.InitialAsyncDataFetch flag which provide optional data load by js-code (asynch) or by creating plain-html code (synch).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.