ActionUrl.UrlFormatString Property
Specifies the URL of the page to be loaded when executing an ActionUrl Action.
Namespace: DevExpress.ExpressApp.Actions
Assembly: DevExpress.ExpressApp.v24.1.dll
NuGet Package: DevExpress.ExpressApp
Declaration
Property Value
Type | Description |
---|---|
String | A string value that represents an URL. |
Remarks
Below is an example of using this property.
public partial class ViewController1 : ViewController{
private void InitializeComponent(){
//...
this.urlAction1 = new DevExpress.ExpressApp.Actions.ActionUrl(this.components);
this.urlAction1.UrlFormatString = "https://www.yahoo.com/";
//this.urlAction1.UrlFormatString = "error.aspx";
//...
}
}
You can specify the name of a persistent object’s property whose value represents an URL. For details, see ActionUrl.UrlFieldName.
public class DomainObject1 : BaseObject {
//...
private string webSite;
public string WebSite {
get { return webSite; }
set { SetPropertyValue(ref webSite, value); }
}
}
public partial class ViewController1 : ViewController{
private void InitializeComponent(){
//...
this.urlAction1 = new DevExpress.ExpressApp.Actions.ActionUrl(this.components);
this.urlAction1.UrlFieldName = "WebSite";
this.urlAction1.UrlFormatString = "http://{0}";
//...
}
}
In this instance, the ActionURL should be activated in a List View for each object or in a Detail View. To do that, set the ActionBase.SelectionDependencyType property to the SelectionDependencyType.RequireSingleObject value and the ActionBase.Category property to “RecordEdit”. In a List View, the Action will be displayed in an additional cell for each object.