public IActionResult Base64(Base64ViewModel model) { try { if (model.Decrypt) { model.ResultString = StringOperation.Base64ToString(model.SourceString); } else { model.ResultString = StringOperation.StringToBase64(model.SourceString); } } catch (Exception e) { model.ResultString = $"Invalid input! Error message: \r\n{e.Message} \r\n {e.StackTrace}"; } return(View(model)); }