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

Syntax

'Declaration
Public Function RenderAsHtml ( _
    bInFrameset As Boolean, _
    bIncludeNewItem As Boolean, _
    strSourceAbsoluteUrl As String _
) As String
'Usage
Dim instance As SPView
Dim bInFrameset As Boolean
Dim bIncludeNewItem As Boolean
Dim strSourceAbsoluteUrl As String
Dim returnValue As String

returnValue = instance.RenderAsHtml(bInFrameset, _
    bIncludeNewItem, strSourceAbsoluteUrl)
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.

Remarks

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

See Also

Reference

SPView Class

SPView Members

RenderAsHtml Overload

Microsoft.SharePoint Namespace