Hello, I have this snippet ...
Code:
Private Sub CmdClear_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdClear.Click
TxtCompany.Text = ""
TxtContact.Text = ""
TxtAddress.Text = ""
TxtCity.Text = ""
TxtState.Text = ""
TxtZipCode.Text = ""
TxtLandPhone.Text = ""
TxtCell.Text = ""
TxtFax.Text = ""
TxtEmail.Text = ""
TxtDate.Text = ""
TxtID.Text = ""
End Sub
I want to execute the above code from inside this snippet ...
Code:
Public Sub CmdSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdSave.Click
Customer.Company = TxtCompany.Text
Customer.Contact = TxtContact.Text
Customer.Address = TxtAddress.Text
Customer.City = TxtCity.Text
Customer.State = TxtState.Text
Customer.ZipCode = TxtZipCode.Text
Customer.LandPhone = TxtLandPhone.Text
Customer.Cell = TxtCell.Text
Customer.Fax = TxtFax.Text
Customer.Email = TxtEmail.Text
Customer.DateCreated = TxtDate.Text
Customer.ID = TxtID.Text
OpenAccount()
AccountLastRecord = AccountLastRecord + 1
FilePut(AccountFileNum, Customer, AccountLastRecord)
FileClose(AccountFileNum)
MsgBox("File Saved")
End Sub
in the old VB6 I could use
How does one do this in .net?