Skip to main content
.NET 6.0+

DevExpress v24.1 Update — Your Feedback Matters

Our What's New in v24.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SimpleAction Class

Represents a Simple Action.

Namespace: DevExpress.ExpressApp.Actions

Assembly: DevExpress.ExpressApp.v24.1.dll

NuGet Package: DevExpress.ExpressApp

#Declaration

[ToolboxTabName("DX.24.1: XAF Actions")]
public class SimpleAction :
    ActionBase

#Remarks

The SimpleAction class inherits the basic functionality of Actions from the ActionBase class. Built-in Action Containers display Simple Actions as buttons. The SimpleAction.Execute event holds custom code that runs in response to button clicks.

ASP.NET Core Blazor, Simple Action in XAF, DevExpress

#Add a Simple Action

You can add a Single Choice Action to a Controller in the following ways:

  • In design time (for the .NET Framework projects): drag and drop the SimpleAction item from the Toolbox (the XAF Actions section) onto the Controller’s Designer area.
  • In code: see the Add a Simple Action (.NET) tutorial.

Alternatively, you can use the ActionAttribute to convert a business class’ method to an Action (see How to: Create an Action Using the Action Attribute).

Note

CodeRush allows you to add Actions and Controllers with a few keystrokes. To learn about the Code Templates for XAF, refer to the following help topic: XAF Templates.

Set the IModelActionWeb.IsPostBackRequired property to true to send a postback when a user executes an Action in an ASP.NET Web Forms application. For example, for Actions that download files or change the application’s language.

#Implements

See Also