有谁能告诉我如何将位图图像显示到cshtml页面?
控制器:
var sigToImg = new SignatureToImage();
var signatureImage = sigToImg.SigJsonToImage(surveyQuestionProxyViewModel.SurveyToolQuestionViewModel.UserSurveyAnswer.AnswerText);
surveyQuestionProxyViewModel.SurveyToolQuestionViewModel.UserSurveyAnswer.AnswerTextSig = signatureImage;
//signatureImage is System.drwaing.bitmap image
html = this.RenderViewToString(@"~/Views/PrintAsPdf/SurveyTool/_ExportSurveyToolQuestion.cshtml", surveyQuestionProxyViewModel);
现在我需要将surveyQuestionProxyViewModel.SurveyToolQuestionViewModel.UserSurveyAnswer.AnswerTextSig
渲染到视图中,如下所示:
<div>
<img src="@Model.SurveyToolQuestionViewModel.UserSurveyAnswer.AnswerTextSig" alt="Signature Image"/>
</div>
但是在运行时看不到任何内容。我该如何渲染呢。