How to upload a LOG32.txt file to a different computer via FTP or such? Thank you.
Wow you guys are helping me so much =D so far so good :)
This code:
I click on ButtonLogin = Logs in, pops window, AND inserts TIME and DATE on log.32.txt.
now, how do I program this button to upload that log.txt file into my computer? via FTP or Any other way, even email? is there a way? I want it to happen every time that button is clicked.
Once again, Thank you Guys =D
private void buttonLogin_Click(object sender, EventArgs e)
{
string password = textBoxPassword.Text;
if (SQLDataAccess.ValidateConnection("Account", password) == true)
{
SQLDataAccess.Password = password;
MessageBox.Show("Login Successful");
textBoxPassword.Text = "";
textBoxPassword.UseSystemPasswordChar = false;
FormCollection fc = Application.OpenForms;
{ FileStream fs = new FileStream
("log32.txt", FileMode.Append, FileAccess.Write);
StreamWriter sw = new StreamWriter(fs); sw.WriteLine(DateTime.Now); sw.Close();
}
foreach (Form ff in fc)
{
if (ff.Name == "Form1")
{
((Form1)(ff)).label1.Text = "Input Box";
}
}
}
else
{
MessageBox.Show("Login failed");
}
}
Thank you Thank you Thank you Thank you