Share via

WebFormsFriendlyUrlResolver.TrySetMasterPageFile Method

.NET Framework 4

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)


Protected Friend Overridable Function TrySetMasterPageFile ( _
    page As Page, _
    masterPageFile As String _
) As Boolean
Dim page As Page 
Dim masterPageFile As String 
Dim returnValue As Boolean 

returnValue = Me.TrySetMasterPageFile(page, _
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


  • 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.

See Also


WebFormsFriendlyUrlResolver Class

Microsoft.AspNet.FriendlyUrls.Resolvers Namespace