ASPForums.Net RSS Feedhttp://www.aspforums.net/Handlers/RSS.ashxLatest additions to the content that appears on ASPForums.Net(c) 2019 www.aspforums.com. All rights reserved.Capture Signature using HTML5 Canvas in ASP.Net Master Page using jQuery<blockquote><cite>KatieNgoc says:</cite> <div class="line number2 index1 alt1"><code class="html plain">&lt;</code><code class="html keyword">script</code> <code class="html color1">type</code><code class="html plain">=</code><code class="html string">"text/javascript"</code> <code class="html color1">src</code><code class="html plain">=</code><code class="html string">"<a href="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js</a>"</code><code class="html plain">&gt;&lt;/</code><code class="html keyword">script</code><code class="html plain">&gt;</code></div> <div class="line number3 index2 alt2"><code class="html plain">&lt;</code><code class="html keyword">script</code> <code class="html color1">src</code><code class="html plain">=</code><code class="html string">"<a href="https://cdn.rawgit.com/mobomo/sketch.js/master/lib/sketch.min.js">https://cdn.rawgit.com/mobomo/sketch.js/master/lib/sketch.min.js</a>"</code> <code class="html color1">type</code><code class="html plain">=</code><code class="html string">"text/javascript"</code><code class="html plain">&gt;&lt;/</code><code class="html keyword">script</code><code class="html plain">&gt;</code></div> <div class="line number4 index3 alt1"><code class="html plain">&lt;</code><code class="html keyword">script</code> <code class="html color1">type</code><code class="html plain">=</code><code class="html string">"text/javascript"</code><code class="html plain">&gt;</code></div> <div class="line number5 index4 alt2"><code class="html plain">$(function () {</code></div> <div class="line number6 index5 alt1"><code class="html plain">$('#colors_sketch').sketch(); $(".tools a").eq(0).attr("style", "color:#000");</code></div> <div class="line number7 index6 alt2"><code class="html plain">$(".tools a").click(function () {</code></div> <div class="line number8 index7 alt1"><code class="html plain">$(".tools a").removeAttr("style");</code></div> <div class="line number9 index8 alt2"><code class="html plain">$(this).attr("style", "color:#000");</code></div> <div class="line number10 index9 alt1"><code class="html plain">});</code></div> <div class="line number11 index10 alt2"><code class="html plain">$("[Id*=btnSave]").on("click", function () {</code></div> <div class="line number12 index11 alt1"><code class="html plain">var base64 = $('[id*=colors_sketch]')[0].toDataURL();</code></div> <div class="line number13 index12 alt2"><code class="html plain">$('[Id*=ImageVal]').val(base64);</code></div> <div class="line number14 index13 alt1"><code class="html plain">});</code></div> <div class="line number15 index14 alt2"><code class="html plain">}); </code></div> <div class="line number16 index15 alt1"><code class="html plain">&lt;/</code><code class="html keyword">script</code><code class="html plain">&gt;</code></div> </blockquote> <p>&nbsp;Replace above code to take reference below code.</p> <pre class="brush: html">&lt;script type=&#34;text/javascript&#34;&gt; $(function () { $(&#39;[id*=colors_sketch]&#39;).sketch(); $(&#34;.tools a&#34;).eq(0).attr(&#34;style&#34;, &#34;color:#000&#34;); $(&#34;.tools a&#34;).click(function () { $(&#34;.tools a&#34;).removeAttr(&#34;style&#34;); $(this).attr(&#34;style&#34;, &#34;color:#000&#34;); }); $(&#34;[id*=btnSave]&#34;).on(&#34;click&#34;, function () { var base64 = $(&#39;[id*=colors_sketch]&#39;)[0].toDataURL(); $(&#39;[id*=ImageVal]&#39;).val(base64); }); }); &lt;/script&gt;</pre> <p>&nbsp;</p>https://www.aspforums.net:443/Threads/164121/Capture-Signature-using-HTML5-Canvas-in-ASPNet-Master-Page-using-jQuery/https://www.aspforums.net:443/Threads/164121/Capture-Signature-using-HTML5-Canvas-in-ASPNet-Master-Page-using-jQuery/Fri, 14 Jun 2019 00:42:55 GMT