i am new to visual basic and i'm trying to create a file with this code
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim curboard As String = comboard.SelectedItem
Dim curstd As String = comstd.SelectedItem
Dim curdiv As String = comdiv.SelectedItem
Dim curmed As String = commed.SelectedItem
Dim filepath As String = "c:\program files\School Attandance Management System 1.0\data\" & curdiv & ".samsclass"
Try
File.Create(filepath)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
This outputs
Illigal characters in path
comdiv,comstd,commed and comboard are comboboxes Please let me know how to concatenete the variables into filepath ?