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...
User Profile
Collapse
-
-
you mean you wanna save the text that is in the text-box into a (.txt) file that may be opened in notepad?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();...
No activity results to display
Show More
Leave a comment: