DotVVM Academy


This application is not supported on mobile browsers.


The methods in the viewmodel can be invoked from the view. We'll use them to implement the add / subtract functionality.

public void Add() 
    Result = ...

Note: DotVVM will make an AJAX request to the server, where the method in the viewmodel will be executed and the changes made to the viewmodel will be applied to the page.


  • Inside the Add method, add the value of Difference to the Result property.
  • Inside the Subtract method, subtract the value of Difference from the Result property.