Convert a HTML Control (Div or Table) to an image using C#

后端 未结 6 1076
滥情空心
滥情空心 2020-12-14 03:52

Is it possible to convert a Html Control to an image in C#?

Is there any C# method where I can pass the Html Control object and return an image of that html control?

6条回答
  •  一整个雨季
    2020-12-14 04:12

    Yes. It can be easily done using the html2canvas method. html2canvas is used to take screenshots of the html elements. Yo can do this by simply adding the html div into an html modal and pass the modal id to the jquery function and call that jqueryy function in the button onclick. you can checkout this link to know more about the htm2canvas method

提交回复
热议问题