WebFormsFriendlyUrlResolver.TrySetMasterPageFile Method
.NET Framework 4.5
Attempts to set the MasterPageFile property for the given page based on whether the master page exists.
Namespace: Microsoft.AspNet.FriendlyUrls.Resolvers
Assembly: Microsoft.AspNet.FriendlyUrls (in Microsoft.AspNet.FriendlyUrls.dll)
Syntax
'Declaration
Protected Friend Overridable Function TrySetMasterPageFile ( _
page As Page, _
masterPageFile As String _
) As Boolean
'Usage
Dim page As Page
Dim masterPageFile As String
Dim returnValue As Boolean
returnValue = Me.TrySetMasterPageFile(page, _
masterPageFile)
protected internal virtual bool TrySetMasterPageFile(
Page page,
string masterPageFile
)
protected public:
virtual bool TrySetMasterPageFile(
Page^ page,
String^ masterPageFile
)
abstract TrySetMasterPageFile :
page:Page *
masterPageFile:string -> bool
override TrySetMasterPageFile :
page:Page *
masterPageFile:string -> bool
function TrySetMasterPageFile(
page : Page,
masterPageFile : String
) : boolean
Parameters
- page
Type: System.Web.UI.Page
The page.
- masterPageFile
Type: System.String
The master page file virtual path.
Return Value
Type: System.Boolean
A boolean value indicating whether the master page was set.