If a form has a state that has to be persisted on the URL, it can be done by
defining a set of parameters that will be copied to/from the URL. In order to do
so you have to create a string property for each of those parameters and write a
getter and a setter for those. The property must be decorated with [FndPageUrlParameter]
.
The name of the property will be the name of the URL parameter on which that
property will be persisted.
[FndPageUrlParameter] public string FromDate { get { return dfdtFromDate.Text; } set { dfdtFromDate.Text = value; this.bDateChange = true; } }
Example of a page URL parameter
The getter will be automatically called by the framework when current URL is
needed. In the example above the URL will get an additional parameter FROMDATE
that will be set to the value of the dfdtFromDate
field. The setter
will be called by the framework during navigation in order to copy the value
from the URL to form. In the example above the value of the URL parameter
FROMDATE would be copied to the dfdtFromDate
field when navigating.
When changing something on the form that affects the added parameters, the
URL in the address bar should be updated by calling RefreshUrl()
.