I am developing a windows application in XP machine.in my one form i have one text box for showing the selected file with path from openfiledialog box.and the other control is button to call the openfiledialog box.
When I cliked on the button to call the open dialog box i am getting the follwing error
rest of the form contains another controls like data grid and dropdowns.
Please help me to resolve this issue
Thanx in advance.
Regards, Sudarshan
Update
Here is my code on button click
OpenFileDialog openfiledialog = new OpenFileDialog();
openfiledialog.Filter = "xml files|*.xml";
openfiledialog.Multiselect = false;
DialogResult dr;
dr = openfiledialog.ShowDialog();
if (dr == DialogResult.OK)
{
txtgrdDataFile.Text = openfiledialog.FileName.ToString();
}