StartPage.GetStartPage Method
Returns the initialization page for the specified page.
Assembly: System.Web.WebPages (in System.Web.WebPages.dll)
public static WebPageRenderingBase GetStartPage( WebPageRenderingBase page, string fileName, IEnumerable<string> supportedExtensions )
Parameters
- page
- Type: System.Web.WebPages.WebPageRenderingBase
The page.
- fileName
- Type: System.String
The file name of the page.
- supportedExtensions
- Type: System.Collections.Generic.IEnumerable<String>
The collection of file-name extensions that can contain ASP.NET Razor syntax, such as "cshtml" and "vbhtml".
Return Value
Type: System.Web.WebPages.WebPageRenderingBaseThe _AppStart page if the _AppStart page exists. If the _AppStart page cannot be found, returns the _PageStart page if a _PageStart page exists. If the _AppStart and _PageStart pages cannot be found, returns page.
| Exception | Condition |
|---|---|
| ArgumentNullException | Either page or fileName are null. |
| ArgumentException | supportedExtensions is null or empty. |
Show: