Home > DeveloperSection > Forums > How to delete notepad based on 24 hours timing? Asp.net C#
Raja Ganapathy
Raja Ganapathy

Total Post:2

Posted on    August-08-2016 7:13 PM

 C# C#  ASP.Net 

 1 Reply(s)
 482  View(s)
Rate this:
I have store the login details (username and datetime ) in notepad.i want to delete this note pad in the time of 23.59.59. and after the next day login again notepad is create.how to delete notepad based on timings.how to split the username and datetime in notepad. and how to retrieve the note pad datetime value and validate the which one is first login person.

What i have Tried

I have done to login details(username and datetime)to store in notepad.but how to delete notepad based on timings.

aditya kumar Patel

Total Post:254

Posted on    August-17-2016 6:46 AM

Create a windows service . for example you can see this url https://www.mindstick.com/Articles/99/windows-service.
by using windows service you can delete notepad file using timer tick event.

protected override void OnStart(string[] args)
            timeticker= new Timer();
            timeticker.Interval = 24;//  
            timeticker.Elapsed += new System.Timers.ElapsedEventHandler(deletenotepad_tick);
            timeticker.Enabled = true; 

    private void deletenotepad_tick(object sender, ElapsedEventArgs e)
            //here write delete notepade code
      protected override void OnStop()
            timeticker.Enabled = false;

Don't want to miss updates? Please click the below button!

Follow MindStick