Jun 21, 2011

create a text file from code behind in asp.net using c#.net

HI 
using StreamWriter u can do file operation
eg


StreamWriter SW;
    SW=File.CreateText("c:\\myfile.txt");
    SW.WriteLine("First Line");
    SW.WriteLine("Second line");
    SW.Close();
    Response.Write("File Created SucacessFully");

No comments:

Post a Comment