nikhilk / scriptsharp

Script# Project - a C# to JavaScript compiler, to power your HTML5 and Node.js web development.
http://scriptsharp.com
Other
658 stars 182 forks source link

Writing to a File #422

Closed SaktiEricsson123 closed 10 years ago

SaktiEricsson123 commented 10 years ago

Hi Nikhil,

I have a requirement of writing the value of a CLOB field to a new .txt file. Means on Click of a button (Client is a mobile phone in this case), I have to get the details from server, create a txt file and write the contents in the txt file and save it. I am getting no idea how to do it in Script # as it does not support any server side pages (example asp) neither it supports System.IO. Please help me in this. Any similar code snippet will help. This may be simple, I am new to script # and has limited knowledge of the same.

nikhilk commented 10 years ago

Use the HTML5 file APIs if you're doing this on the client. See https://github.com/nikhilk/scriptsharp/tree/cc/src/Libraries/Web/Html/Data/Files

Hope that helps.