C# Class Rock.Web.PageReference

Helper class to work with the PageReference field type
Show file Open project: SparkDevNetwork/Rock Class Usage Examples

Public Methods

Method Description
BuildUrl ( ) : string

Builds the URL.

GetParentPageReferences ( RockPage rockPage, PageCache currentPage, PageReference currentPageReference ) : List

Gets the parent page references.

PageReference ( ) : System

Initializes a new instance of the PageReference class.

PageReference ( PageReference pageReference ) : System

Initializes a new instance of the PageReference class.

PageReference ( Uri uri, string applicationPath ) : System

Initializes a new instance of the PageReference class from a url.

PageReference ( int pageId ) : System

Initializes a new instance of the PageReference class.

PageReference ( int pageId, int routeId ) : System

Initializes a new instance of the PageReference class.

PageReference ( int pageId, int routeId, string>.Dictionary parameters ) : System

Initializes a new instance of the PageReference class.

PageReference ( int pageId, int routeId, string>.Dictionary parameters, NameValueCollection queryString ) : System

Initializes a new instance of the PageReference class.

PageReference ( string linkedPageValue, string>.Dictionary parameters = null, NameValueCollection queryString = null ) : System

Initializes a new instance of the PageReference class.

SavePageReferences ( List pageReferences ) : void

Saves the history.

ToString ( ) : string

Returns a System.String that represents this instance.

Private Methods

Method Description
BuildRouteURL ( string>.Dictionary parms ) : string

Builds the route URL.

GetRouteIdFromPageAndParms ( ) : int?

Gets the route id from page and parms.

Method Details

BuildUrl() public method

Builds the URL.
public BuildUrl ( ) : string
return string

GetParentPageReferences() public static method

Gets the parent page references.
public static GetParentPageReferences ( RockPage rockPage, PageCache currentPage, PageReference currentPageReference ) : List
rockPage Rock.Web.UI.RockPage
currentPage PageCache
currentPageReference PageReference
return List

PageReference() public method

Initializes a new instance of the PageReference class.
public PageReference ( ) : System
return System

PageReference() public method

Initializes a new instance of the PageReference class.
public PageReference ( PageReference pageReference ) : System
pageReference PageReference The page reference.
return System

PageReference() public method

Initializes a new instance of the PageReference class from a url.
public PageReference ( Uri uri, string applicationPath ) : System
uri System.Uri The URI e.g.: new Uri( ResolveRockUrlIncludeRoot("~/Person/5")
applicationPath string The application path e.g.: HttpContext.Current.Request.ApplicationPath
return System

PageReference() public method

Initializes a new instance of the PageReference class.
public PageReference ( int pageId ) : System
pageId int The page id.
return System

PageReference() public method

Initializes a new instance of the PageReference class.
public PageReference ( int pageId, int routeId ) : System
pageId int The page id.
routeId int The route id.
return System

PageReference() public method

Initializes a new instance of the PageReference class.
public PageReference ( int pageId, int routeId, string>.Dictionary parameters ) : System
pageId int The page id.
routeId int The route id.
parameters string>.Dictionary The route parameters.
return System

PageReference() public method

Initializes a new instance of the PageReference class.
public PageReference ( int pageId, int routeId, string>.Dictionary parameters, NameValueCollection queryString ) : System
pageId int The page id.
routeId int The route id.
parameters string>.Dictionary The route parameters.
queryString System.Collections.Specialized.NameValueCollection The query string.
return System

PageReference() public method

Initializes a new instance of the PageReference class.
public PageReference ( string linkedPageValue, string>.Dictionary parameters = null, NameValueCollection queryString = null ) : System
linkedPageValue string The linked page value.
parameters string>.Dictionary The parameters.
queryString System.Collections.Specialized.NameValueCollection The query string.
return System

SavePageReferences() public static method

Saves the history.
public static SavePageReferences ( List pageReferences ) : void
pageReferences List The page references.
return void

ToString() public method

Returns a System.String that represents this instance.
public ToString ( ) : string
return string