Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
2.00/5 (2 votes)
See more:
i have code in asp.net for uploading a picture and saving in a location. I want a code that will load the saved picture and some data (e.g Name, Address, City, Country etc ), after you click on (a Print or a View) button on your page, it will display(Preview) a page or a form showing all this data(i.e. the picture on one side,and the other data below)

[edit]Subject moved into question body, tags - OriginalGriff[/edit]
Posted
Updated 4-Mar-11 3:26am
v2
Comments
OriginalGriff 4-Mar-11 9:26am    
What have you tried? Anything?
Sandeep Mewara 4-Mar-11 9:44am    
Any effort? What have tried? If you say you write saving code, I don't see why you should not be able to write code to retrive it back.
Monjurul Habib 4-Mar-11 15:45pm    
please share your code to help you out.

On button click, first save image in your website folder using.......
string name="I001"; //Write code to increment image id
string extension=Path.GetExtension(FileUpload1.PostedFile.FileName);
FileUpload1.SaveAs(Server.MapPath(".\\Images\\")+name+extension);

then,
write code
//Image1 is ASP Image control
Image1.ImageUrl=Server.MapPath(".\\Images\\")+name+extension;
 
Share this answer
 
If your looking to just display the picture and information you could use a report viewer.

You can pass parameters into the report. So the file path to the image would be one. Then you place an image object from the tool box onto the report and in the properties tell it to use the parameter as the location of the image.

Is your data stored in a database? If so you can query the database to get it out and set it as the datasource for the report.

Either way you might want to check out SQL Server Reporting Services and the Report Viewer.
 
Share this answer
 
Uploading Image to a Folder and Display the Image after Upload

If i misunderstand your question, please feel free to correct me.
I hope the above information will be helpful. If you have more concerns, please let me know.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900