如何使用Silverlight 4 Web项目下载不同格式的文件? [英] How to download diffrent formats file using silverlight 4 web project?

查看:88
本文介绍了如何使用Silverlight 4 Web项目下载不同格式的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想使用silverlight 4 Web应用程序下载不同格式的文件.到目前为止,我还没有找到任何代码.如果您对此有任何想法,请提供帮助.

我希望此下载看起来像正常的ASP.net项目下载显示.

表示一个下载窗口,询问文件的下载位置.

Hello All,

I want to download different formats file using silverlight 4 web application. I am not found any code for this till now. if you have any idea about this please help.

I want this download look similar like normal ASP.net project download shows.

Means a download window asking for download location for a file.

thanks.

推荐答案

看看 ^ ].
我提供了一个链接-如果您在Internet上搜索,应该会找到更多信息.
Have a look at the save file dialog[^] in Silverlight.
I''ve provided one link - if you search on the internet, you should find some more informaiton.


谢谢.

但这不起作用.
实际上,我在silverlight面板中添加了一个组合框,并在其中输入了所有格式.

我从wcf服务获得了字节数组.

现在,我要保存它.

在这种情况下会出现错误.

错误字符串:对话框必须由用户启动."

此错误出现在此行"bool?dialogResult = this.dialog.ShowDialog();"
Thanks.

But this is not working.
Actually i add a combobox in silverlight panel and enter all formates in that.

I get a byte array from wcf service.

Now i am going to save that.

In this case there is a error.

Error string: "Dialogs must be user-initiated."

This error appear on this line "bool? dialogResult = this.dialog.ShowDialog();"


好了,现在我找到解决方案.

我发现,如果有一个按钮,则它无法正常工作,因此我可以创建所需的功能.

这仅适用于按钮.因此所有代码都可以正常工作,并且问题与该
的执行有关

感谢您的帮助.

如果您发现更多内容,请提出建议.

再次感谢.
Well Now I find the solution.

I found that if there is a button then it works otherwise not so i make it possible in creating required function.

This is working only for button. so all codes are working and problem is related to execution of this


Thanks for help.

If you find anything more please suggest.

Thanks again.


这篇关于如何使用Silverlight 4 Web项目下载不同格式的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆