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 Image name and image url in sqlserver table after upload; WASM

I have two database tables: an item table and an Image table. I want to be able to save and fill in the item details from the edit form which contains a file upload to upload images of the item.

I'm using dapper and I have no issues saving my item data. i as well have no issue uploading files to my server project.

public int ItemIDNumber { get; set; }
public string? ItemName { get; set; }
public string? ItemDescription { get; set; }

but I'd want to be able to get back the saved itemID number which is an increment int generated automatically by the database so I can use it to save each image upload data in the database. 

public int ItemIDNumber { get; set; }
public string? ImageName { get; set; }
public string? ItemURL { get; set; }

1.How can I get image names and URLs when uploaded

2. How can I get back the itemIDnumber so I can use it for the image table ?

3. i want to get this done by clicking on submit on the edit form.

1 Reply

SP Sureshkumar P Syncfusion Team December 5, 2022 11:31 AM UTC

Hi Boot,

You can refer to the below public forum answers to achieve your requirements.

Forum: https://www.syncfusion.com/forums/153253/upload-file-on-editform-submit


Sureshkumar P

Live Chat Icon For mobile
Up arrow icon