ボタンクリックでMessagingToolkit.QRCode.dllを使用してQRコード画像を作成しました。画像をディスクに保存しました。ポップアップとして表示とは別に画像を表示するにはどうすればよいですか?
これが私のコントローラーコードです:
[HttpPost]
public ActionResult GenerateQR(string Command, FormCollection collection)
{
// qr code logic //
QRCodeEncoder encoder = new QRCodeEncoder();
Bitmap img = encoder.Encode(qrcode);
img.Save(@"D:\\Capture.png", ImageFormat.Jpeg);
// Checking the image present in the filepath and displaying the image.
string filePath = @"D:\\Capture.png";
if (!System.IO.File.Exists(filePath))
return Content("<script language='javascript' type='text/javascript'>alert('The Image is not available.');</script>");
else
return new FilePathResult(filePath, "image/png");
}
ここでは、画像が完全に表示されています。ビューとは別のポップアップとして画像を表示する方法。