Hiii

I am developing one window application in c#.net with sql server 2005 as database.

now, i have Some questions:

How To Use OpenFileDialog control in C# window application.
and how to give the validation for it.
How To copy this file On The Other Folder also store the path of this file on the database.

Hi Quick reply If it's possible.

Hi you can use Openfile dialog control like wise:

private void button1_Click(object sender, System.EventArgs e)
{
   if(openFileDialog1.ShowDialog() == DialogResult.OK)
   {
      System.IO.StreamReader sr = new 
         System.IO.StreamReader(openFileDialog1.FileName);
      MessageBox.Show(sr.ReadToEnd());
      sr.Close();
   }
}

Hope this helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.