I recently was asked why to use ContentResult instead of returning string. Unfortunately I could not give a better answer than: \"It is best practi
ContentResult
string
Returning a ContentResult helps protect your application.
E.g If your application allows input from users, a malicious user might try to parse a javascript text. This will prevent javascript from executing in your application