how to display image by canvas in MVC

AGAI 1 Reputation point
2021-08-03T15:29:20.25+00:00

How to display image by canvas in MVC.
Thanks.

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,254 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Yijing Sun-MSFT 7,066 Reputation points
    2021-08-04T09:11:27.36+00:00

    Hi @AGAI ,
    I suggest you could use drawImage() method in the Canvas context with ajax. You could set up a controller method that returns your image url as a result.And then you could use the drawImage() method in the Canvas context to draw the image on the Canvas using ajax jquery.

    About ajax jquery,you could refer to below article:
    https://api.jquery.com/jquery.ajax/

    I have created a demo just like this and you could refer to :
    120455-new-text-document-9.txt
    Best regards,
    Yijing Sun


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments