Private Sub SaveButton1_Click(ByVal sender As System.Object, ByVal e As System.E
ID: 3634370 • Letter: P
Question
Private Sub SaveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveButton1.ClickDim filestring As String = "statestext.xt"
Dim recordstring As String = stateevaluationtextbox.text & Environment.NewLine &
StateNameTextBox1.Text & Environment.NewLine
My(computer.filesystem.WriteAllText(filestring, recordstring, True))
With StateNameTextBox1
.Clear()
.Focus()
End With
StateAbbrevTextBox2.Clear()
End Sub
Where it says computer.filesystem - it says 'filesystem' is not a member of 'string' how can i fix this to get this to work?? My program will not run just because of that. Need help?
Explanation / Answer
Dear,
Private Sub SaveButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveButton1.Click
Dim filestring As String = "statestext.xt"
Dim recordstring As String = stateevaluationtextbox.text & Environment.NewLine &
StateNameTextBox1.Text & Environment.NewLine
System.IO.File.WriteAllText(filestring, recordstring)
StateNameTextBox1.Clear()
StateNameTextBox1.Focus()
StateAbbrevTextBox2.Clear()
End Sub
I hope this will helps you...
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.