OpenFileDialog dlg = new OpenFileDialog(); dlg.Filter = @"Picture File (*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp | All Files (*.*)|*.*"; if (dlg.ShowDialog() == true) { txtFileUpload.Text = dlg.SafeFileName; }
FileStream (txtFileUpload.Text, FileMode.Open, FileAccess.Read);