WebPageBase::RenderSection Method (String)
In layout pages, renders the content of a named section.
Assembly: System.Web.WebPages (in System.Web.WebPages.dll)
Parameters
- name
- Type: System::String
The section to render.
| Exception | Condition |
|---|---|
| HttpException | The name section was already rendered. -or- The name section was marked as required but was not found. |
The RenderSection method assumes that a section passed to it in the name parameter actually exists. If the named section does not exist, the method throws an exception. If you want to use an optional section where the section might exist in an instance of a content page, use the RenderSection method overload to render the section.
Show: