I need to bind such button :
<button type="button" onclick="location.href='@Url.Action("Compress", "Home")'" />
with such controller action :
public void Compress()
{
_compressingService.CompressAllFiles();
}
the service CompressAllFiles(); don't get the value, it is just do compressing files in server.
that is why me controller method is void, but pressing this button i have:System.NullReferenceException: 'Object reference not set to an instance of an object.
exception. what's wrong? may be i'm wrong bind it or my signature of controller action is not valid? thank you