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.
Unfortunately, activation email could not send to your email. Please try again.

Return All the files uploaded back the the aspx file into a GridView

Thread ID:

Created:

Updated:

Platform:

Replies:

121579 Jan 4,2016 10:21 PM Jan 11,2016 03:54 AM ASP.NET Web Forms 4
loading
Tags: Uploadbox
Jenson Chew
Asked On January 4, 2016 10:21 PM

Dear All,
I actually save the file name and tag to their unique Id, as 1 id can have several files tagged to it.
I save it into a database table in MS SQL 2012 Express.
I'm wondering how can I inform that .aspx file that the upload is completed, and now I want to trigger the code in .aspx.vb or .aspx.cs code behind to execute a stored procedure to pull out all the uploaded files that's tagged to the current Id, and bind it to Datagrid for display.
I wish to know how the stage changes can be made informed to the code behind file where the uploadbox control was implemented in.
Thanks in advance!
Cheers,
Jenson

Ezhil S [Syncfusion]
Replied On January 5, 2016 06:15 AM

Hi Jenson,

Thank you for contacting Syncfusion support.

Query : how can I inform that .aspx file that the upload is completed.
If you are using client side component Essential Javascript UploadBox control then you can use “complete” event, which will be triggered in the end of uploading all the files. So we suggest you to use complete event and define your function to be performed on upload completion. The complete event argument have the uploaded file name, size, extension and other details.
Refer the following UG and online demo for more details regarding UploadBox events,
http://help.syncfusion.com/js/api/ejuploadbox#events:complete
http://js.syncfusion.com/demos/web/#!/azure/uploadbox/Events
You can check the sample in link below to ensure the behavior:

http://jsplayground.syncfusion.com/vkaiijyp

If you are using Syncfusion ASP.NET Wrapper’s UploadBox control then you can use “OnComplete” server side event. This will directly pass the uploaded files detail to code behind file on a post back using the complete event handler arguments. Please refer the following online demo, http://asp.syncfusion.com/demos/web/uploadbox/events.aspx

Please let us know if you have any other queries.

Regards,
Ezhil S

Jenson Chew
Replied On January 7, 2016 12:46 AM

Dear Ezhil,

Thanks for your response. I'm not using ASP.NET Wrapper, may I know beside using ejGrid, can I use ASP.NET GridView control instead?

Thanks.

Regards,
Jenson

Jenson Chew
Replied On January 7, 2016 05:05 AM

Can I display a list of hyperlinks to the files uploaded, so that user can immediately open and check the files once all of them have been uploaded?

Arun Palaniyandi [Syncfusion]
Replied On January 11, 2016 03:54 AM

Hi Jenson,

Thanks for the update,

Query 1: I'm not using ASP.NET Wrapper, may I know beside using ejGrid, can I use ASP.NET GridView control instead?

Yes, you can use ASP.NET GridView to display the details of the uploaded files. After the file upload is complete, through the ASP hidden field, pass the values to code behind. The values will be the list of JSON strings and the values deserialize.  Then bind the values to the Gridview. Now, complete event argument values like the Filename,size,extension,datemodified will be displayed in the ASP Gridview.

Query 2: Can I display a list of hyperlinks to the files uploaded, so that user can immediately open and check the files once all of them have been uploaded?

This can be achieved by giving the ASP linkbutton column to the Gridview. Once the files are uploaded, the filename with the hyperlink will be displayed as one of the columns, and if the user clicks, the file will be downloaded and opened.

We have prepared a custom sample based on your scenario. You can find it in the following link:
http://www.syncfusion.com/downloads/support/forum/121579/ze/uploadgrid1238109887

Please let us know if you have any other query.

Regards,
Arun P


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;