![]() |
|
[.NET] On button click, add current time and date to txt file in web - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] On button click, add current time and date to txt file in web (/showthread.php?tid=5946058) |
On button click, add current time and date to txt file in web - Formula 1 - Feb 28, 2019 like the title say when the button is clicked i want it to send the current date and time to txt file (log file) also userTextBox.Text, so i can see it in this format username: HackForumsUser Date: 28/02/2019 Time: 20:58 And then when i click the button again, i want it to add the new one after the old one for example: username: HackForumsUser Date: 28/02/2019 Time: 20:58 username: HackForumsUser2 Date: 29/02/2019 Time: 22:58 username: HackForumsUser3 Date: 22/03/2019 Time: 21:58 RE: On button click, add current time and date to txt file in web - Who Soup - Feb 28, 2019 I gotchu, posting to update later. EDIT: Things Needed:
![]() Add Button: Code Dim packet As String = "Username: " & TextBox2.Text & vbNewLine & "Date: " & Date.Now & vbNewLine & "Time:" & TimeOfDaySave Button: Code File.WriteAllLines(Environment.CurrentDirectory & "Saved.txt", los)Full Code: Code Imports System.IORE: On button click, add current time and date to txt file in web - Formula 1 - Feb 28, 2019 (Feb 28, 2019 02:00 PM)Who Soup Wrote: I gotchu, posting to update later. Awesome bro, Thank you! |