0

Is there any controls that I can download that allows a user to upload images with just a button click and be able to open the file dialog. I do not want to use the fileupload control.

2 Answers 2

1

If you're looking for something with better asthetics, Steve Sanderson has a nice Ajax uploader with a progress bar you can check out. Pretty straightforward installation.

http://blog.stevensanderson.com/2008/11/24/jquery-ajax-uploader-plugin-with-progress-bar/

Sign up to request clarification or add additional context in comments.

2 Comments

this works very nicely thank you. Would you know how I can strip out the full path and just show the filename within the text ara?
Are you talking about after its uploaded? I'm trying to remember off the top of my head but I believe the controller action should return the filename as a string.
1

According to me: no. It would open a security hole as if you don't let an enduser decide which file to select from his/her drive an application would be able to leech anything from that drive.

The ASP.NET fileupload control itself simply renders to an <input type="file"> html element. How the browser renders that is up to the browser. However it can be styled. For example like this: http://www.quirksmode.org/dom/inputfile.html.

If it's on a corporate LAN and there's a certain file on a users drive and (s)he opens your page then you might want to use something like a custom written ActiveX control which can be embedded in the rendered html to perform the task.
A variant on this one would be to create a winforms user control, embed that into the rendered html (a so called smart client), with enough CAS settings on the client pc to be able to do this.

4 Comments

well is there a nicer looking versionat least because that conrol is absolutely hideous
Errr, which control are you talking about? I didn't point out to one specifically.
I was talking about the fileupload control available is asp, sorry I realized I wadnt descriptive witin my original question. I still want to open the file dialog though,just don't want to use that ugly fileupload control
I added some extra information about how to style the <input type="file"> html element.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.