Kumar AU

Kumar AU

  • 1.8k
  • 185
  • 24.1k

Displaying the error message in TryUpdateModel in MVC4

Jan 30 2018 8:31 PM
My Code :-
if (TryUpdateModel(model))
//My Logic
ActivityLogger.LogActivity("HandleReceiverAddressSubmitted Method" + ModelState.Values);
Here in "ModelState.Values" rather then giving the actual error message its showing as 'System.Collections.Generic.Dictionary`2+ValueCollection'
Could you please help me how do I Log the error message If any error occurred in the TryUpdateModel in MVC4 in my code.

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (1)