My application is in WPF. Application based on video editing, so I am saving the project as a .xml format. And when I double click the saved file, it does not opened in my wpf application. I want to open the saved file in my application when the user double click the saved file icon. Is it possible? I searched the solution, but I didn't get any idea?
You don't say what OS this is for. You need to do one of two things:
1) Change the file association for the .xml type (On windows 10 this is a little more complicated)
or
2) Change your own file type to something else and create a new file association for it. This would be the preferred way.
Answer from previous question/post
Related
i am writing a web application with React, where users can write protocolls for their appointments. The current system is: the web application saves the word file in the local file system, the user edits it and uploads it via a macro in word.
That seems a bit clunky to me and i am not so sure about the security issues of letting the browser directly access the local file system.
So i wanted to let the users edit the files directly via the browser, with an editor similar to GoogleDocs.
Problem is:
Documents have to remain on premis
Converting doc files to a format that can be displayed in a browser and back seems to have some formating issues.
The user must be able to download the file and edit it, in case they have an appointment without internet access and upload it later. So it has to be at least convertable to a document that can be easily edited in Word.
There are so many richtext editor, but from what ive seen none is designed for that use-case. So my question is: Is what i want to do even possible, and if so does anyone know a good editor or library for doing so?
I have an InfoPath form that sits on my SharePoint site. When the file is clicked in the SharePoint directory, the user is usually given the option to Save or Open the file (sometimes dependent on the browser). Saving the file is frowned upon because I want to ensure that the user is using the latest version of the InfoPath form from the SharePoint location.
In a general web sense, is there a way to disallow a user (or at least attempt to prevent a user) from saving the file, and only opening it? I'm not talking about automatically downloading the file when they click it, as I know this is a security problem, and the reason why the open/save prompt exists in the first place. But can a prompt that only allows them to "Open" a downloaded file be shown instead?
And if not in a general web sense, can this be accomplished somehow using SharePoint black magic? I know that single-clicking a file in SharePoint (depending on the list or directory you're looking at) can sometimes result in that file just being opened in its native application without any prompt to the user whatsoever.
hmmm, I'm not sure if this will help but try creating a hyperlink to your form using this format:
https://sharepoint/YourSite/_layouts/FormServer.aspx?XsnLocation=https:sharepoint/YourSite/YourLibrary/Forms/template.xsn&Source=https://sharepoint/YourSite&DefaultItemOpen=1
This will open the form without the open/save dialog box
I've Googled and searched stackoverflow for this but I've not found an answer that is suitable.
All I want to do is place a button a form, the code behind this button will contain a reference to a location on a harddrive where a pdf file is stored. All I want to do is have it so that when the user clicks the button the pdf file opens in the machines selected pdf reader (this is an internal application so the 2-3 machines that access it will always have adobe acrobat on them).
I've no idea which (if any) of the built in .NET classes can do this.
EDIT: There will be 100's of pdfs all added throughout time, I will have a path reference to one pdf per order in my system which points to a file storage server where the PDF lies. The PDF is not locally hosted.
How can this be done in the simplest sense?
You can simply use this code
System.Diagnostics.Process.Start(#"c:\myPdf.pdf");
It will open the file you provide with its associated default program
I need to create a file in memory (without saving any copy of it in a filesystem) and then offer it to the user so that he/she can save it in his filesystem. How can I do this in Silverlight?
In Silverlight, access to files can be only user initiated.
This means, saving the file using a SaveFileDialog class.
Follow the link, there is an example there.
Hey there,
i have a table with a field called "file" full of binary data (The File Itself) how can i open this binary data directly from the database on a click Event for example using c# ?
i dont want to download the file each time to view it .. just view it using the default viewer in the user's OS.
Any Ideas ??
To start off with other than an extremely trivial (throwaway) application I hope that you have setup some layers to abstract the DB access from your UI.
Ultimately your application will have to get the binary object from the DB table and present it as a file to the OS. The applications that come to mind typically want you to pass a filename to them to open them. In essence this means you have to download the file to the local machine with this technique.
The alternative would be to store the files on the filesystem of a server somewhere and place the name/location in your DB (nvarchar). Your application could get the filename/location and pass that to the viewer application.