Author: GVNPublic123 | Posted on: 6/14/2009 6:53:07 AM | Views : 445

Hello,
 
What I am trying to do, is let user insert the url into text box, and when clicking on Button1, the URL should save to file called urls.txt (each url in own line).
 
When button is pressed, I do:
writeToFile(@"\App_Data\urls.txt", TextBox2.Text);

 
And writeToFile is:
public void writeToFile(string line, string file)
    {      
        try
        {
            TextWriter writer = new StreamWriter(file);           
            writer.WriteLine(line);
        }
        catch (Exception exception)
  &nb ...

Go to the complete details ...