I am testing the Signature Pad plugin by Thomas J Bradley and have it working and am able to convert the JSON signature to PNG using PHP but would like to be able to convert the JSON signature to PNG using C#.
There is a supplimental class for doing this called SignatureToImageDotNet which I have not been able to get to work. I should mention that I am new to ASP.NET / C#. So far I have created a website in Webmatrix and have the signature capture form up and running and can return the outputed JSON to a page but am unable to convert it to a PNG image. I’ve created an ‘App_Code’ folder and put the ‘SignatureToImage.cs’ file in it but I’m not sure how to call it.
I’m sure this would be very trivial for someone with ASP.NET / C# experience and I’m hoping someone has done this before or could do it and let me know exactly how to do it as the documentation is very brief.
You did the right thing in creating the App_Code folder, usually people miss that part. As far as calling the class, ASP.NET Web Pages works pretty much like PHP. You create a code block at the top of a cshtml page, which executes when the page is loaded:
http://www.asp.net/web-pages/tutorials/introducing-aspnet-web-pages-2/getting-started
Depending on what else you’re doing in the request (I would need a little more info / code), my guess is you can just start to use the SignatureToImage class inside of a razor block at the top of the page:
default.cshtml
I know the answer is a little open ended, but please feel free to ask my an questions about how Web Pages or C# works, if you have something more specific.