Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can a .NET server push file processing results to clientside jQuery?

Tags:

jquery

c#

I have an HTML page that upload a fileOfRecords.txt containing item to add to a database (.NET/C# server). Upload the file work fine.

I'm trying to have the server send a status back to the client as each line in the file is being processed.

The controller method will loop thru every row adding the items to the database. On every iteration I would like to send a message to the client with a status whether the it succeeded of failed. Can anyone guide me as to how this is done using jQuery, AJAX, and C#?

Unfortunately I have no code since I have absolutely no idea how to start.

like image 667
Andre Rubnikowich Avatar asked Nov 20 '22 20:11

Andre Rubnikowich


1 Answers

Are you trying to get jquery to call a server side function?

well, good news.

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

like image 185
David May Avatar answered Mar 15 '23 23:03

David May