views:

259

answers:

1

Alright, so i have a silverlight application,

it opens a filedialog, gets the selected file, transfers it to asp.net which saves it to the server, but i want to know how to implement a progress bar for it. for big files, and multiple file uploads, i will need to know the progress of the file upload to the server, is this possible?

A: 

You will probably save yourself a lot of time and heartache by just integrating this Silverlight File Upload codeplex project into your app.

You can't actual get good progress information from the standard WebRequest or WebClient components. Not only do they not send any of the Request stream until your code has finished writing to it (a decision I can't begin to understand), it doesn't provide any progress events once it starts sending it. For reasons I can't begin to fathom you can get progress events when sending a string, go figure.

I can only guess that these limitations arise from Silverlight needing to operate in multiple browsers and therefore the interface to the Browser HTTP transport is kept as basic as possible.

AnthonyWJones