store image in a folder form a list in silverlight - silverlight

I want to store a image in to a folder which I have selected from a list in silverlight

In Silverlight you have only limited access to the file system for security reason.
So everything what you want to save would end up in IsolatedStorage...
Check out this Quickstart Video and let me know if it helps
http://www.silverlight.net/learn/quickstarts/isolatedstorage/

In Silverlight, You have limited access to the client file system. If you are running Out Of Browser application with elevated permission, you can access User folders (My documents in windows).
But you can try some workarounds like using JavaScript u can try to download file. For reference Download a picture OnClick

Related

IE file download box get location

i am currently working on a issue where i need to get location of the file downloaded.First let me explain the scenario.
I placed a link in my page and when user clicks the link it shows file download dialog with open/save/cancel options in IE.Now when the user clicks on the save button and choose a location to save the file i need to get that file saved location using whatever options possible.
Thanks!
I do not think you can... at least not easy. This runs on the client, and for security reasons you can not acces the client's filesystem with javascript.
Maybe it is however possible using a flash or silverlight plugin, as the user can allow access from within these applications to the local filesystem. It might be very difficult tho...
The browser will not allow you to access information about the clients filesystem.

Silverlight and XtraReports - opening generated PDF report in new tab in browser

I'm trying to send a PDF file from a WCF to silverlight client. PDF is generated by DevExpress XtraReports (in method XtraReport CreateReport(string reportTypeName, RootGenericReportParameterContainer reportInformation)).
Acually PDF is saved somewhere on clients computer after choosing save path in file save dialog - DevExpress takes care of everything - but I don't have a clue how to open the PDF in new tab in browser.
And here is another problem. Silverlight 4 has no access to local file system right? So information about local PDF location is useless. Maybe it would be better to save the PDF in WCF and send a link to it to the client - but how?
I would first question why you need to send the file to the Silverlight client. Get rid of that requirement and the solution becomes much simpler. Silverlight can provide a link that opens a new browser tab. That link would be handled by the web domain, processing it as an HttpHandler, generating the PDF file for the browser. Your PDF url doesn't have to reference a physical file, you can still generate it on request, handle querystring values, etc... Lots of different ways to do this.
Seems that the question isn't really about DevExpress or Silverlight - you're just looking to open a [document of some kind] in a new tab. Each browser natively handles things differently, and users can change tab handling to whatever they want. And (as you mentioned) once the user has downloaded the file, you no longer control it.
Your best bet (and the way I do it) is probably to have a link pointing to a handler/file using "target='_blank' " in the anchor tag on the webpage. From the server side, you would want to set the "Content-Disposition" header to "Inline" to indicate to the browser that the document should be displayed in place instead of downloaded ("Attachment").

Silverlight 4 OOB application and Images folder

I am developing a Silverlight 4 application which displays items in a carousel control. The items are parsed form an XML file and then loaded as an image which can be double clicked to open a website, file, image etc.
I am already running in higher privileges mode (out of browser) to access the Xml file which sits in a subfolder of the application.
I can load the images fine when they are added to the project as they are included as resources. However, I need to be able to load images which aren't individually added to the project. Instead, I would like to add all images in a particular folder as resources.
Is this possible?
Thanks in advance
From Advanced Silverlight Out of Browser- Introduction
When running in a trusted environment,
you can access only files in user
folders, specifically the MyDocuments,
MyMusic, MyPictures, and MyVideos
folders
So, if you want to access folders other than this, you would probably need to run some sort of service, which has the proper rights. What kind of service depends on where this app is running. Could be a WCF service, or a simple WebService, if you can run a webserver on the machine. Otherwise, you'd need a windows service of some sort.

C Sharp DEvelopment of Windows Forms Application

I'm developing a Windows Application in C sharp.using a Web Browser control to Login to the Https Site and Download the List of files. I'm able to login in to the Site and I'm able to Navigate to the Page where files are listed to be downloaded. When I try Downloading the file using the file URL and trying to Navigate using Web Browser Control a Pop - Up appears asking whether to Open or Save or cancel. How to handle this Pop up and I'm stuck here.
Any Answers are appreciated.
Thanks,
Vinay.
If all you are trying to do is download a file, you might be better off using webRequest.Create("Url") instead of the WebBrowser control. There are ways of handling authentication depending on the method the website uses.
It's best not to use the WebBrowser to download files (unless initiated by the user, who can click the save button). Instead, you can use a WebRequest to download the files from your application.
Since you said you have to log in to the website, I'm going to assume that it uses the popular method of using cookies (as opposed to HTTP Basic Auth). To get the cookies from the WebBrowser, you can use the Cookie property of the WebBrowser's Document property.

how to Read a folder on local machine and load them in a silverlight control?

I am implementing a silverlight application in that I need to read a folder which has images in it. That folder is in my local machine. I want to access that folder to my silverlight code behind.After that i want to load all those images into Listbox control( or any other control to display images one by one. ) to display them one by one. Here I have next and previous buttons to move images.
You can access local files in Silverlight 4 if running as a trusted application, but not in Silverlight 3 without user interaction.
Note also "you can access only files in user folders, specifically the MyDocuments, MyMusic, MyPictures, and MyVideos folders. "
Nope you can't do this, you would need SL4 OOB with Elevated Trust to be able to this.

Resources