0
我有一个网站,提供媒体文件。如果没有找到一个文件,我在页面上显示一个简单的信息与下面的代码的用户:显示HTML格式的错误消息与HttpResponseMessage
var fileNotFoundResponse = new HttpResponseMessage(HttpStatusCode.NotFound);
if (!File.Exists(mediaFile.FilesystemLocation))
{
fileNotFoundResponse.Content = new StringContent("File not found! <br /> Please contact <a href='mailto:[email protected]'>[email protected]</a>");
return ResponseMessage(fileNotFoundResponse);
}
的问题是,是,它是一个白色的页面不显示HTML上只是简单的文本我希望它能够显示HTML。
有没有办法做到这一点?
谢谢!