本文介绍了如何编写从服务器上载文件或图像的路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从服务器上获取文件.路径已在局域网中连接到应用程序(在我的本地系统中)中创建,就像@"...........\"
怎么可能?
先生,请帮我...
I want to take files from my server. The path has created in application (in my local system) connecting in LAN, like @"...........\"
how it is possible?
please help me sir...
SaveFileDialog sfdBackUpPath = new SaveFileDialog();
sfdBackUpPath.Title = "Select File To Upload";
sfdBackUpPath.InitialDirectory = @"server2\";
DateTime DT = DateTime.Today;
sfdBackUpPath.FileName = "FAMS_" + DT.ToString("yyyyMMdd");
sfdBackUpPath.Filter = "BAK files (*.*)|*.bak";
sfdBackUpPath.FilterIndex = 1;
sfdBackUpPath.RestoreDirectory = true;
if (sfdBackUpPath.ShowDialog() == DialogResult.OK)
{
if (sfdBackUpPath.FileName != "")
{
int index = sfdBackUpPath.FileName.IndexOf(".bak");
this.txtFile.Text = sfdBackUpPath.FileName.Remove(index, 4);
}
}
推荐答案
这篇关于如何编写从服务器上载文件或图像的路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!