如何在IN BROWSER模式下在BETA 2中执行文件打开对话。 [英] How to do a fileOpen Dialogue in BETA 2 in IN BROWSER mode.
本文介绍了如何在IN BROWSER模式下在BETA 2中执行文件打开对话。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以在WEB模式下(在浏览器中)进行文件打开对话?
Is it possible to in WEB mode (in browser) a file open dialogue ?
提前致谢
paul。
推荐答案
以下好的(?)代码可以做到。
The following nice (?) piece of code could do it.
如果你有更简单的解决方案,请告诉我。
Please let me know if you have a simpler solution
partial void SearchCustomers_Created()
{
this.FindControl("UploadButton").ControlAvailable += new EventHandler<ControlAvailableEventArgs>(
(s1, e1) =>
{
var btn = e1.Control as System.Windows.Controls.Button;
btn.Click += new System.Windows.RoutedEventHandler(
(s2,e2) =>
{
System.Windows.Controls.OpenFileDialog dlg = new System.Windows.Controls.OpenFileDialog();
dlg.Filter = "All Files (*.*)|*.*";
var fileSelected = dlg.ShowDialog();
if (fileSelected.HasValue && fileSelected.Value)
{
// do stuff ...
}
});
}
);
}
这篇关于如何在IN BROWSER模式下在BETA 2中执行文件打开对话。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文