M# Tutorials

Learn to build .NET applications with M#. Our step-by-step tutorials will get you up-to-speed rapidly.
If you already know ASP.NET and C#, you can master M# in a week or two.

Custom Action

In the previous tutorials of this chapter we have disused the pre-written actions provided by M#. In this tutorial we will look at using custom actions.

M# provides a custom action in the list of button actions, which is used to write custom server side or client side code as required.

As shown in the screenshot above, you can write server or client side code in the code editor and specify some meaningful description for this custom code.

By default M# shows the C# code editor and generates a server side button click handler for the code. You can change that using “Is JavaScript” attribute for this action.

You can also specify a “Well-known Code” instead of the “Code” attribute (Please read tutorial Well Known Code in chapter 13 for more details). This action has also all the standard attributes available for other actions e.g. visibility criteria.