how to save content in notpad a website by asp .net
how to save content in notpad a website by asp .net?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Suthish NairPosted Oct 25, 2010, 6:09 AM
manoj kumarPosted Oct 25, 2010, 4:32 AM
Bt I have another problum.
First time create folder..if we are create another time it's give me error..
I want to all time create unique folder according time..
Suthish NairPosted Oct 25, 2010, 3:52 AM
manoj kumarPosted Oct 25, 2010, 3:46 AM
give me error.
manoj kumarPosted Oct 25, 2010, 2:53 AM
bt its not give me any output..
string baseUrl = "http://www.4guysfromrolla.com/articles/051802-1.aspx";
WebRequest requestHTML = WebRequest.Create(baseUrl);
WebResponse responseHTML = requestHTML.GetResponse();
StreamReader reader = new StreamReader(responseHTML.GetResponseStream());
String htmlContent = reader.ReadToEnd();
Suthish NairPosted Oct 25, 2010, 2:49 AM
search for HttpWebRequest class
manoj kumarPosted Oct 25, 2010, 2:36 AM
Koteswararao MallisettiPosted Oct 25, 2010, 2:25 AM
next this is the code to write the data into text file
FileInfo fileinfo;
string filepath = @"E:\emailLogfile.txt";
fileinfo = new FileInfo(filepath);
if (!fileinfo.Exists)
{
fileinfo.Create();
}
StreamWriter eventlogwriter = fileinfo.AppendText();
string completemsg = msg; //this message is displayed on the txt file in the specified path
eventlogwriter.WriteLine(completemsg);
eventlogwriter.Close();
Suthish NairPosted Oct 25, 2010, 2:22 AM
check the notepad way:
http://www.c-sharpcorner.com/UploadFile/dhavalweb30/2340/