WebPageBase.RenderSection Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
RenderSection(String) |
In layout pages, renders the content of a named section. |
RenderSection(String, Boolean) |
In layout pages, renders the content of a named section and specifies whether the section is required. |
RenderSection(String)
In layout pages, renders the content of a named section.
public System.Web.WebPages.HelperResult RenderSection (string name);
member this.RenderSection : string -> System.Web.WebPages.HelperResult
Public Function RenderSection (name As String) As HelperResult
Parameters
- name
- String
The section to render.
Returns
The HTML content to render.
Exceptions
The name
section was already rendered.-or-The name
section was marked as required but was not found.
Applies to
RenderSection(String, Boolean)
In layout pages, renders the content of a named section and specifies whether the section is required.
public System.Web.WebPages.HelperResult RenderSection (string name, bool required);
member this.RenderSection : string * bool -> System.Web.WebPages.HelperResult
Public Function RenderSection (name As String, required As Boolean) As HelperResult
Parameters
- name
- String
The section to render.
- required
- Boolean
true to specify that the section is required; otherwise, false.
Returns
The HTML content to render.