Skip to main content

Microsoft Silverlight

Answered Question Opening Local Files with Javascript or C#RSS Feed

(0)

FuryDiamond
FuryDiamond

Contributor

Contributor

3928 points

781 Posts

Opening Local Files with Javascript or C#

I am having problems opening Office 2003 (xls, doc, and ppt extensions) and 2007 files (xlsx, docx, pptx extensions) using Javascript.  The following code works for non-Office files and html pages.  It works when running on localhost or a remote server, but if you are testing on the hard drive or usb drive, it doesn't. Any suggestions?  Is there a way to have them open the files?

        function gotoPage(page) {
            window.open(page);
        }

        function gotoPage2(page) {
            window.location = page;
        }

 

Or is it possible to open the file in the Silverlight C# backend? 

Please "Mark as Answer" if this post answered your question. :)

SharpGIS
SharpGIS

Contributor

Contributor

3387 points

611 Posts

Answered Question

Re: Opening Local Files with Javascript or C#

No this is not possible and you shouldn't be doing this. This is not a limitation caused by Silverlight either.

--
/Morten | blog - twitter
Please click on "Mark as Answer" if this answered your question.
  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities