ASP.NET Refresh page after image is loaded
I have an ASPX page where I upload an image to the server for a server click event. On my page, it will show the available image if it exists. When I upload the image, it will replace the old one with the new one. Now the same image is displayed after loading as well. How can this be solved? I used the window.location.reload () javascript function to update, but then it doesn't work. He publishes the page again.
This is my code
Do UploadImage(studentId,mode); // Function to upload image
StringBuilder sbc = new StringBuilder();
sbc.Append("<script language='javascript'>");
sbc.Append("alert('Upload process completed successfully!');");
sbc.Append("window.location.reload()");
sbc.Append("</script>");
HttpContext.Current.Response.Write(sbc);
0
source to share
4 answers