We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to save signature in the database

Hi


Is there a way to save signature using the sfsignature in the database? can you please help how to save it because currently the only funcionality i have seen is that you when you click save button it will just download the signature. 


Thank you 


1 Reply

YA YuvanShankar Arunagiri Syncfusion Team April 24, 2023 04:53 AM UTC

Hi Lubo,


We have checked your requirement and using the GetSignatureAsync method of signature component, we can get the signature as base64 URL and will save it in database shown as below.


private async Task onSave()

    {

        base64Url = await signature.GetSignatureAsync();

    }


And using the LoadAsync method signature component, we can load the saved signature (base64 URL) from database to signature component.


private async Task onLoad()

    {

        await signature.LoadAsync(base64Url);

    }


Check with attached sample code file and get back to us if you need any further assistance on this.


Regards,

YuvanShankar A



Attachment: Index_430477e1.zip

Loader.
Live Chat Icon For mobile
Up arrow icon