-2

I have a Site in which user can take screenshot and send it through mail.

First thing how can i take a screenshot on button click event in javascript or jquery. Second thing how can i send that image byte to controller Actionresult()

Please help me with this..

See now i found few references

Jquery

$("#Click").html2canvas(document.body, {

        onrendered: function (canvas) {
            $.post('../Home/proof',
                    {
                        images: canvas.toDataURL()
                    },
                  function (data) { });
        }
    });
 <input type="button" id="Click"  value="Click"/>
   [HttpPost]
   public ActionResult proof()
        {
         //   @RequestParam(value="image");
            String imageBase64;
           // byte[] bytes = imageBase64.replaceAll("data:image/.+;base64,", "").getBytes();

            return View();
        }

but it doest hit the controller.. Pls help

MuthuKumar
  • 7
  • 1
  • 5
  • Refer to this [question](http://stackoverflow.com/questions/4912092/using-html5-canvas-javascript-to-take-screenshots) I think that is what u needed and if so, this question is possible duplicate! – Vikas Arora Feb 18 '14 at 05:56

1 Answers1

0

Jquery is the best way to take screenshot here is link.You Just give you web url or taking current url using js document.URL

Nazim Ali
  • 180
  • 1
  • 13