Export (0) Print
Expand All

StartPage.GetStartPage Method

Returns the initialization page for the specified page.

Namespace:  System.Web.WebPages
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.WebPageRenderingBase
The _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.

ExceptionCondition
ArgumentNullException

Either page or fileName are null.

ArgumentException

supportedExtensions is null or empty.

  • Medium trust for the immediate caller. This member can be used by partially trusted code.
Show:
© 2014 Microsoft