Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6851241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:13:25+00:00 2026-05-27T01:13:25+00:00

I want to upload a particular file on server in Silverlight 4, Simply, to

  • 0

I want to upload a particular file on server in Silverlight 4,

Simply, to upload any file we can use the “Browse” button.
When you click on this button we can get the file directory and choose any file & we can upload the particular file.

i have coded on browse button

 private void btnBrowse_Click(object sender, RoutedEventArgs e)
        {
            var fileDialog =new OpenFileDialog();
            fileDialog.ShowDialog();
            fileDialog.Multiselect = true;
            txtUploader.Text = fileDialog.File.DirectoryName;
            fileDialog.File.CopyTo("C:/UploadedFiles");
        } 

here the problem is, only the dialog box is opening
not able to select multiple file,
not getting path,
not able to upload the file to specified location.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:13:26+00:00Added an answer on May 27, 2026 at 1:13 am

    Try changing the order that you are setting up your OpenFileDialog Box.

    Also you are returning a FileInfo object. If you are going to return multiple files you need use Files instead of File it will return a collection of FileInfo objects. You can then iterate over the collection to get your information. In testing out the code I was getting a Security Exception on reading the path of the files, you do not have the permissions needed to do what you want to do per @MattGreer’s comment.

    Edit added from @AnthonyWJones comment.

    There is not any way to do what you are trying to do, except to create an OOB with elevated trust, and that will limit you to the users MyDocuments Folder.

    enter image description here

    private void btnBrowse_Click(object sender, RoutedEventArgs e) 
        { 
            var fileDialog =new OpenFileDialog(); 
            fileDialog.Multiselect = true; 
            fileDialog.ShowDialog(); 
    
            IEnumerable<System.IO.FileInfo>  files = fileDialog.Files;
            foreach (System.IO.FileInfo fi in files)
            {
               txtUploader.Text = fi.DirectoryName;
               fi.CopyTo("C:/UploadedFiles");     
            }
        }  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Flex i want to upload a particular file to server form local system.how
I want to upload an Excel File using (HTML.Input) in some folder in server
I want upload file without reload page. My server-side is ASP.NET MVC. Ext.Ajax.request( {
I have xml file with collection image urls and I want upload this url
I want to upload an image file into mysql database on Android Mobile Programming,
I want to upload 30GB with asp.net file upload control, i have heard that
I want to upload file to a host by using WebClient class. I also
I want to upload a csv file into a sql table. Here is my
I have a particular php class that I want to be able to upload
I want to upload a file from a web application. The web application calls

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.