Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Upload file from client to server in asp.net 2.0

Posted on 2011-03-18
7
Medium Priority
?
530 Views
Last Modified: 2013-11-07
Hi,

I have an application developpedin asp.net 2.0 C# and used within my own company intranet. There is a requirement where files have to be uploaded from a specific folder on client desktop to server side once user clicks a button on the application page.
File is of type pdf and the client side folder path will be retrieved from the server.

User should not be given to browse and select for file to load but only upload files found in the uploaded folder for him. Once upload to server, the file should be deleted from client side

Is there any silverlight, ajax, jquery.js, javascript or activeX component that will enable me to perform this?

Note that security is not an issue, the application has been granted as trusted site with low level security

it is like moving file from client to server side

Thanks. Please provide examples together with solution
0
Comment
Question by:Princemuhammad
  • 4
  • 2
7 Comments
 
LVL 25

Expert Comment

by:apeter
ID: 35183082
You can do in silverlight. for sample see below code. It uses from file open dialog but you can skip and read files from your hard coded path. Also from aspx  page you can call method inside silverlight and vice versa.
http://www.c-sharpcorner.com/UploadFile/nipuntomar/FileUploadsilverlight03182009030537AM/FileUploadsilverlight.aspx
0
 

Author Comment

by:Princemuhammad
ID: 35189445
Hi Peter,
Thanks for your response, I am actually using visual studio 2005 and i did not find any silverlight for this environment. Can you kindly advise how the specified solution can be implemented in .net 2.0?

Is there another way to do it instead of silverlight?
0
 
LVL 25

Accepted Solution

by:
apeter earned 500 total points
ID: 35191996
This link show how to create control on asp.net 2.0
http://stackoverflow.com/questions/758728/how-to-create-silverlight-application-in-asp-net-2-0

this link tells how to use the silverlight xaml and xap files
http://forums.silverlight.net/forums/p/7203/170091.aspx
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 

Author Comment

by:Princemuhammad
ID: 35209421
Hi, i am unable to do install silverlight on my pc due to visual studio 2008 SP1 and I have Visual studio 2005 and Visual Studio 2008 SP2 installed.

Is there another solution by using activeX?

Note that there is no security restriction since my application run internally within the company network and web application has been to trusted site with low level security.

Is there not an an activeX which bypass the browser security and run on the aspx page together with javascript and source path is obtained from the server?

I am poor in ActiveX kindly help please
0
 
LVL 19

Expert Comment

by:Amandeep Singh Bhullar
ID: 35231559
Check the Discussion forum
http://forums.asp.net/t/1203189.aspx/1/10

The guy is having the similar Issue.
This may help you
0
 

Author Comment

by:Princemuhammad
ID: 35298668
Hi,

The issue the guy is having, is not the same. He wants to know how to upload multiple files. My requirement is to upload files without user has to browse for the files and select files
0
 

Author Closing Comment

by:Princemuhammad
ID: 35474546
The solution provided in the links are not compatible with .net 2.0
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question