SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

I'm using my SPList View to get the html code of extracted items by an SPQuery over the listview

SPList myList = mySite.RootWeb.Lists.GetByInternalName("ListINStr");
SPView oView = myList.Views["ViewTitle"];
SPQuery myQuery = new SPQuery(oView);
string MailHTMLBody = myList.RenderAsHtml(myQuery);

But since SPQuery.RowLimit is not defined it's set to a limited number of the view which I believe it's 30 however I need to get them all items , so how can I set myQuery.RowLimit to extract all items ?

share|improve this question
up vote 5 down vote accepted
myQuery.RowLimit = 0

I think if I'm correct: 0 = unlimited

Hope this helps. :)

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.