C# - Get Option To Preview Or Save File After Upload?
Jan 27, 2010
I got a pdf creator on my webapp where my user can create a pdf with different stats. How should I do so they get the option to prewiev or save the file right after the creation of it? the file is saved.
Combing the web for a simple file uploader for ASP.NET with a server side save and preview capability didn't reveal anything simple, and I noticed a lot of people were struggling to get something too.I figured this example out today. It uses existing techniques and is simple. Downside is that you have to use session for the temporary store, and the Ajax AsyncFileUpload usess session too.Written in VS 2010 - I hope you find it useful. This is the basic working code - that should easily be exandable even for more demanding requirements such as Repeater controls etc.
I've an application built on asp.net 2.0. There is an option for user to upload excel file. Once the file has been uploaded the data in the file is validated against some business rules. Rows that successfully validates are inserted into database as soon as it is validated.
I use ado.net to connect to excel file. And use data reader to iterate over all the records. Normally the number of records range from 5,000 to 20,000. This process takes good 8 to 10 minutes. I want to optimize this process because to my understanding it takes too long. Currently I am looking at OPENROWSET, OpenDataSource which so far is unsuccessful. Valiation that takes place on every row is very simple. I only checks for maximum length. So validation itself is not an issue.
I ve a script for downloading a file. but that file is getting downloaded into docs/download folder by default. How can i change this so that the user can download it to a specific location or directory.. current script is as follows :
How to know the FileName AjaxFileUpload in the event Click of a Button without going through earnest for this is what I found that is to say that the FileName is only in the event Designed AjaxFileUpload1_UploadComplete.
I have to implement an image upload functionality in asp.net. The method I have followed works like this :-
Submit a form containing an <input type='file'> element and set the target of the form to a named iframe[to give the impression of a Ajax request/response ]. The aspx file which this form is posted to, writes the image into the response as Reponse.Write("<img src='location'/>"); The image displayed is due for cropping (where i plan to use JCrop).
What I would like to know is : Is there another way to display the image in a <div> may be, rather than in an iframe which I think is far better than this approach.
In my asp.net page I have an image upload control where users can upload there profile photo. what I want is when user browse his/her photo an immediate preview should displayed. Is there any ajax image control for that or how can I implement that?