Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi there. I am trying to find a way to download the data I have stored in an array into a text file. I am not using AJAX but I am using HTML5. What would be the best way to download this file? I know of the FileSaver API provided in HTML5 but cant seem to get it to work. The solution needs to work on all HTML5 browsers.
Posted
Comments
Sandeep Mewara 9-Jul-12 4:47am    
Not clear on if you want to share and ask on how file API works in HTML5

OR

you are here to know ways to interact your code behind file from JavaScript?

Hi,
You can call a c# function using javascript using __doPostBack function of javascript.
Here is the article for using __doPostBack function.

Call C# function from JavaScript[^]

All the best.
--Amit
 
Share this answer
 
First of all you need to know what kind of JavaScript you are using. It could be JScript, V8, depending on the browser. Second, you have to know if you really need to call .NET. If it is IE, then it is using JScript, and you can use the old WinHTTP to download files or make any requests.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900