Hi, i am working on form . i want small window to pop up when i click button and to will select XML file of my chois from various folder.
I guess, this OPenfileDialog will help me.
check the code.
private void button3_Click(object sender, EventArgs e)
{
/
OpenFileDialog OpenFileDialog1 = new OpenFileDialog();
openFileDialog1.Filter = " XML Files|*.xml";
openFileDialog1.InitialDirectory = @"D:\";
if (OpenFileDialog1.ShowDialog() == DialogResult.OK)
{
MessageBox.Show(filed.FileName.ToString());
}
}
I tried using following code but when i click on the button there window doesn't pop up. i am not geting what mistake i have made.
What is the problem with that?
Thanx