C# WinForm程序 怎么把图片上传到指定的文件夹中 ???
各位前辈
C# WinForm程序 怎么把图片上传到指定的文件夹中 ???
求指教
------解决方案--------------------同求~~
------解决方案--------------------自己研究的一下,下面的代码基本上解决了问题
  
private void btnUpLoad_Click(object sender, EventArgs e)//上传图片
        {
            DialogResult dr = openFileDialog.ShowDialog();
            if (dr == DialogResult.OK)
            {
                string imgName = openFileDialog.SafeFileName;
                string imgpath = openFileDialog.FileName;
                picImage.Image = Image.FromFile(imgpath);
                File.Copy(openFileDialog.FileName, Application.StartupPath + "\\imgs\\" + imgName);
            }
        }
------解决方案--------------------http://www.cnblogs.com/Leo_wl/archive/2011/07/15/2107724.html
------解决方案--------------------这个叫复制
------解决方案--------------------学习学习
------解决方案-------------------- if (Directory.Exists(filePath))
                    Directory.CreateDirectory(filePath);
                /*上传文件*/
                string profilepath = filePath + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls";
                byte[] xlsfile = null;
                xlsfile = new byte[fileLen];
                Stream sm = FileUpload1.PostedFile.InputStream;
                sm.Read(xlsfile, 0, fileLen);
                sm.Close();
                sm.Dispose();
                CreateOrUpDateFile(profilepath, xlsfile);
 /// <summary>
    /// 创建文件
    /// </summary>
    /// <param name="filePath">创建文件的路径</param>
    /// <param name="fileByte">文件(字节)</param>
    public void CreateOrUpDateFile(string filePath, byte[] fileByte)