0
我想將silverlight文件保存(上傳)到silverlight應用程序文件夾中。如何在silverlight中上傳文件
我得到的URI應用
string str3 = App.Current.Host.Source.AbsoluteUri + "/Recording/";
,但我不知道如何保存文件。
我用這個代碼.....
string extension = "wav";
// Create an instance of the open file dialog box.
OpenFileDialog openFileDialog1 = new OpenFileDialog();
// Set filter options and filter index.
openFileDialog1.Filter = String.Format("{1} files (*.{0})|*.{0}|WAV FILES (*.*)|*.*", extension, "Audio");
openFileDialog1.FilterIndex = 1;
openFileDialog1.Multiselect = false;
// Call the ShowDialog method to show the dialog box.
bool? userClickedOK = openFileDialog1.ShowDialog();
// Process input if the user clicked OK.
if (userClickedOK == true)
{
string str = App.Current.Host.Source.AbsoluteUri + "/Recording/";
openFileDialog1.File.CopyTo(str);
}
我想只加載wav文件並保存在應用程序文件夾中.......... 有任何其他的想法或代碼plz分享它 – DoNetDeveloper 2012-02-29 10:11:29
你使用的是什麼版本的Silverlight?您可能沒有權限保存到應用程序文件夾;你有沒有嘗試將它保存到destkop呢? – 2012-02-29 10:18:46