Hello Everyone
I am new in vesual basic and i have a couple of questions:
I have the following code that is allowing me to save an image uploaded from a user into a root folder
Question one:
Once i upload the file and i click on the ImageStorage folder, i don't see an image, but if i exit the entire applicxation and then i go back in i am able to see the image. How can i refresh the folder wothout having to exit the application?
Question two:
I am trying to display the image once is uploaded. i have the following to display the image:
once the page is uploaded i don't see an image, instead i see a little square with a red X
Thank you for your help
BK
I am new in vesual basic and i have a couple of questions:
I have the following code that is allowing me to save an image uploaded from a user into a root folder
HTML Code:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Dim fileName As String = Path.GetFileName(FileUploadUserProfile.PostedFile.FileName)
FileUploadUserProfile.PostedFile.SaveAs((Server.MapPath("~/ImageStorage/") + fileName))
Response.Redirect(Request.Url.AbsoluteUri)
End Sub
Once i upload the file and i click on the ImageStorage folder, i don't see an image, but if i exit the entire applicxation and then i go back in i am able to see the image. How can i refresh the folder wothout having to exit the application?
Question two:
I am trying to display the image once is uploaded. i have the following to display the image:
HTML Code:
<img src="string url = ResolveUrl("~/ImageStorage/" + filename)" />
Thank you for your help
BK