Class InputPageReference
Simple input type that displays a page selector.
Implements
Inherited Members
Namespace: EPiServer.Web.WebControls
Assembly: EPiServer.dll
Version: 9.12.2Syntax
public class InputPageReference : InputBase, INamingContainer
Constructors
InputPageReference()
Declaration
public InputPageReference()
InputPageReference(IContentRepository)
Declaration
public InputPageReference(IContentRepository contentRepository)
Parameters
Type | Name | Description |
---|---|---|
IContentRepository | contentRepository |
Properties
AutoPostBack
Gets or sets a value indicating whether the control should generate a post back when the value is changed.
Declaration
public bool AutoPostBack { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
DisableCurrentPageOption
Gets or sets a value indicating whether you should disable the current page option for the InputPageReference UI.
Declaration
public bool DisableCurrentPageOption { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
DisplayControl
Gets the System.Web.UI.WebControls.TextBox that is used to display the selected page on the client.
Declaration
public TextBox DisplayControl { get; }
Property Value
Type | Description |
---|---|
System.Web.UI.WebControls.TextBox | The System.Web.UI.WebControls.TextBox that is used to display the selected page on the client. |
PageLink
Gets or sets the pagelink.
Declaration
public PageReference PageLink { get; set; }
Property Value
Type | Description |
---|---|
PageReference | The pagelink. |
RequireUrlForSelectedPage
A value indicating whether pages that aren't visible on the site should be selectable in the page selection dialog. When true only pages having the IsVisibleOnSite property set will be selectable.
Declaration
public bool RequireUrlForSelectedPage { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
ValueControl
Gets the System.Web.UI.HtmlControls.HtmlInputHidden that is used to store the value on the client.
Declaration
public HtmlInputHidden ValueControl { get; }
Property Value
Type | Description |
---|---|
System.Web.UI.HtmlControls.HtmlInputHidden | The System.Web.UI.HtmlControls.HtmlInputHidden that is used to store the value on the client. |
Methods
CreateChildControls()
Creates a HtmlInputHidden control to store the value and a disabled TextBox to show the selected value to the user. Also creates a button that opens the page browser dialog.
Declaration
protected override void CreateChildControls()
OnPreRender(EventArgs)
On the PreRender event we update the display field.
Declaration
protected override void OnPreRender(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs object that contains the event data. |
Events
ValueChanged
Occurs when the value of the input has changed.
Declaration
public event EventHandler ValueChanged
Event Type
Type | Description |
---|---|
System.EventHandler |
Remarks
For it to trigger you need to set AutoPostBack = true as well.