SPView.RenderAsHtml Method (Boolean, Boolean, String)

Returns the view in HTML format but allows for rendering within a frameset.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

public string RenderAsHtml(
	bool bInFrameset,
	bool bIncludeNewItem,
	string strSourceAbsoluteUrl
)

Parameters

bInFrameset
Type: System.Boolean

true to specify that the view is in a frameset; otherwise, false.

bIncludeNewItem
Type: System.Boolean

true to display the New List Item button; otherwise, false.

strSourceAbsoluteUrl
Type: System.String

A string that contains the site-relative list view URL in the form "Lists/List_Name/View_File_Name.aspx".

Return Value

Type: System.String
A string that contains the view in HTML format.

If both the bInFrameset parameter and the bIncludeNewItem parameter are set to true, then list URLs similar to the following are included in sort URLs:

&ListUrl=%2fTestWeb1%2fLists%2fTestCustList2%2fAllItems%2easpx&
   IncludeNewItem=True&Source=Lists%2fTestCustList2%2fview1%2easpx
Show: