Ashx file creating images in MVC ASP.net?

In the controller, you need to create a function that return a FileResult in vb. Net Function img() As FileResult Dim bmp As Bitmap = Nothing Dim dll As New Chess. CChessBoard dll.

DrawBoardPNG(bmp) Dim imgStream As New IO. MemoryStream bmp. Save(imgStream, ImageFormat.

Png) imgStream. Position = 0 Return File(imgStream. ToArray, "image/png") End Function in the view, you only need to call img src="/test/chess/img.

In the controller, you need to create a function that return a FileResult in vb. Net Function img() As FileResult Dim bmp As Bitmap = Nothing Dim dll As New Chess. CChessBoard dll.

DrawBoardPNG(bmp) Dim imgStream As New IO. MemoryStream bmp. Save(imgStream, ImageFormat.

Png) imgStream. Position = 0 Return File(imgStream. ToArray, "image/png") End Function in the view, you only need to call.

I am dynamically creating images and need to show those images to users. For that I have created a ashx file but the problem is this ashx file is never getting called not sure why path issue or need add any tags in web. EDIT 1: Got to know that session is null in the context any reason?

Or MVC asp.net don't require ashx handlers please advise.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions