Click here to Skip to main content
15,937,602 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all..

uploading images into folder and bind image to image control it shows previous image after log out and log in it will displays current image am binding image to image control for every uploaded image but it not getting refresh
can any one help me please

thanks in advance
Posted
Comments
DaveAuld 19-Sep-11 3:34am    
What code are you using to do the upload and image control update/bind? Is the browser cache causing the problem perhaps? have you tried setting the expires header to no-cache in the page.
Muralikrishna8811 19-Sep-11 3:39am    
Can you specify the code which you are using .it can better to solve your problem
Kishore Jangid 19-Sep-11 3:46am    
Enter you code.....
rkthiyagarajan 19-Sep-11 6:09am    
We need your code?

1 solution

When your image will be uploaded then at that time call a image binding method or write a code for binging that particular image with your control

C#
string path = "~/Images/" + FileUpload1.FileName;
Image1.ImageUrl = path;
Image1.DataBind();


here i have uploaded all my images in to Images derictory so i used "~/Images/"
you can use your path insted this and get the uploaded file name using FileUpload controls FileName property for binding current image to your image viewer control...
 
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