totally at a loss with openfiledialog extension
i have the following code
VB Code:
Dim myStream As System.IO.Stream
Dim openFileDialog1 As New OpenFileDialog()
openFileDialog1.Title = "Open a File"
openFileDialog1.InitialDirectory = "c:\"
openFileDialog1.Filter = "xml files (*.xml)|*.xml|All files (*.*)|*.*"
openFileDialog1.FilterIndex = 1
openFileDialog1.RestoreDirectory = True
If openFileDialog1.ShowDialog() = DialogResult.OK Then
myStream = openFileDialog1.OpenFile()
fileName = openFileDialog1.FileName
MsgBox(fileName)
If Not (myStream Is Nothing) Then
myStream.Close()
End If
End If
the thing that gets me, is that when i display the string name "filename" in the message box, it has two extension,
"test.xml.xml"
how can i only make it add one extension... I have no idea what is wrong..
thanks,
jeff