I programmed a solution and your feedback is highly appreciated,
I found a solution that I want to share with you and I would love to hear your feedback,
- I modified my uploader function to save the image path in URI format(Encoded) (ie. Dim ImgURI As String = New Uri(Server.MapPath("URL String")).AbsoluteUri)
- To show the image on webform I decode the URI to URL
-
Function ConvertURI(URI As String)
Dim DecodeURI As String = HttpUtility.UrlDecode(URI) 'Decode URI string
Dim SubURI = DecodeURI.Substring(DecodeURI.IndexOf("Your Folder"))
Dim URL As String = "~/" & SubURI ' Restore the URL string format
Return URL
End Function
' then in your code
Dim ImgURL As String = ConvertURI("Your URI")
Sampleimg.ImageUrl = ImgURL
- To show the image in your RDLC report just set the image control source to external and assign the image value to field value in your table
Your feedback is highly appreciated, Thanks!