Hello,
How to Implementing file log in asp.net.Use seprate class to implementing logic og file and how to access this class in page on button click......
thanks in advance
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyendra Kumar Singh18 reputationPosted Dec 28, 2016, 3:12 AM EST
{
HttpRequest oHttpRequest = HttpContext.Current.Request;
StreamWriter oStreamWriter = new StreamWriter("/MiscFiles/Errors.htm", true);
oStreamWriter.WriteLine("----- Start Error : " + System.DateTime.Now.ToString() + " -----");
oStreamWriter.WriteLine("
oStreamWriter.WriteLine("
oStreamWriter.WriteLine("
oStreamWriter.WriteLine("
");
oStreamWriter.Close();
}
{
catch (Exception ex)
{
error.LogErrors(ex);
}
Maharudra GadekarRank #5,163 · 309 reputationPosted Dec 28, 2016, 2:39 AM EST
Satyendra Kumar Singh18 reputationPosted Dec 28, 2016, 2:32 AM EST
Chetan RanpariyaRank #1,852 · 801 reputationPosted Dec 28, 2016, 2:32 AM EST