简体   繁体   中英

Retrieving & Displaying data from csv files using AJAX

I need to provide a feature such that the user is able to upload a csv file.Once the uploading is done I need to retrieve each value and show it on a grid which is implemented using far point( http://www.fpoint.com/products/spread/spread.aspx ).But all this has to be done without the page being refreshed.I use asp.net 2.0 & Ajax Pro.Remember I cannot use the inbuilt AJAX feature provided by microsoft . To be precise I need something similar to the lines of attaching a file using gmail.

First, you can't do an upload with AJAX - the technology doesn't support posting files. SO What I did in similar case (and what sites like gmail do) - put an upload control in an iframe within the page. When upload is complete the page in in the frame should trigger some event on the hosting page and the hosting page would do AJAX call to server to retrieve CSV values. If you don't want to use MS AJAX, you can use AJAX capabilities of jQuery. Here's a good example I used to learn ajax in jQuery:

http://encosia.com/2008/05/29/using-jquery-to-directly-call-aspnet-ajax-page-methods/

Hope it helped, Andrey

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM