User Profile

Collapse

Profile Sidebar

Collapse
relikangus
relikangus
Last Activity: Nov 14 '09, 08:39 AM
Joined: Nov 1 '09
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • leo6300
    leo6300 posted a Visitor Message for relikangus
    Hello! I saw your post on how to save the content of a textbox to a .txt file. Maybe you can help me. I have a textbox, textBox1, and a button, Save. When you push Save it should save the content of textBox1 to a .txt file. I copied the code, but I received some errors:
    <<'System.IO.Fi leMode' does not contain a definition for 'OpenORCreate'> >
    and
    <<'System.IO.St reamWriter' does not contain a definition for...
    See more | Go to post

  • relikangus
    replied to save textbox value
    ok

    1. make sure you add the using System.IO in the directives at the top. you need that to do reading/writing to files on the systm

    String theData = textbox1.Text;

    FileStream aFile = new FileStream("myT extFile.txt", FileMode.OpenOR Create);
    StreamWriter sw = new StreamWriter(aF ile);
    sw.WriteLine(th eData);
    sw.close();


    i'm assuming that the text box is called t...
    See more | Go to post
    Last edited by relikangus; Nov 1 '09, 07:45 PM. Reason: clarifiation

    Leave a comment:


  • relikangus
    replied to save textbox value
    you mean you wanna save the text that is in the text-box into a (.txt) file that may be opened in notepad?
    See more | Go to post

    Leave a comment:


  • How do i do two consecutive WebRequest.GetResponse ?

    i'm new to c#

    the following is my code:
    *************** *************** ************
    HttpWebRequest myRequest = (HttpWebRequest )WebRequest.Cre ate("http://www.google.com" );

    HttpWebResponse myResponse = (HttpWebRespons e)myRequest.Get Response();
    myResponse.Clos e();

    myRequest = (HttpWebRequest )WebRequest.Cre ate("http://www.mns.com");
    myResponse = (HttpWebRespons e)myRequest.Get Response();...
    See more | Go to post
No activity results to display
Show More
Working...