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)

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