Download with no save dialog

Dec 13, 2011 at 3:45 PM

I have a DataGrid in Silverlight 4. One of the columns is a hyperlink button that I want to open Adobe Acrobat Reader to view the selected file in a separate window.  Is there a way to do this using Interlink?

Dec 13, 2011 at 5:35 PM

Yes, you can use the DownloadDialog, just use the static OpenFileInline method.

Dec 13, 2011 at 8:18 PM

I could have missed it in the documentation, but how do I do that in the code behind without seeing any open dialog or save file dialog?

Dec 13, 2011 at 8:27 PM

If want to download the file to their local file system you have two options:

1. Use the DownloadFileDialog as normal. This uses the Silverlight FileSaveDialog etc.
2. Use the static DownloadFileDialog.OpenFileAsAttachment. This uses the normal browser File Save/SaveAs

If you want to open the file directly in the browser then you can use the static DownloadFileDialog.OpenFileInline. This opens the file directly in the browser window