Image not display
-
Respected, Hi sir ,I am save the image on server folder when I retrieve image for display from server folder it not be display my code is as follow : Dim photo As String = "JC001924.jpg" Dim strimage As String = "~/SchoolFeeCollection_lalit1/Photos/JC001924.jpg" '"~/Photos/" & photo Image1.ImageUrl = Server.MapPath(strimage)
-
Respected, Hi sir ,I am save the image on server folder when I retrieve image for display from server folder it not be display my code is as follow : Dim photo As String = "JC001924.jpg" Dim strimage As String = "~/SchoolFeeCollection_lalit1/Photos/JC001924.jpg" '"~/Photos/" & photo Image1.ImageUrl = Server.MapPath(strimage)
Your variable strimage returns correct path?! It seems to me that isn't correctly initialized.
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
-
Respected, Hi sir ,I am save the image on server folder when I retrieve image for display from server folder it not be display my code is as follow : Dim photo As String = "JC001924.jpg" Dim strimage As String = "~/SchoolFeeCollection_lalit1/Photos/JC001924.jpg" '"~/Photos/" & photo Image1.ImageUrl = Server.MapPath(strimage)
whats this..?
Dim strimage As String = "~/SchoolFeeCollection_lalit1/Photos/JC001924.jpg" '"~/Photos/" & photo
the easy way to find the path is to ..! drop an image control and go to properties set the image url to the image which is stored in the folder..!and copy the path from the source which will generate by VS..!LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.
-
Respected, Hi sir ,I am save the image on server folder when I retrieve image for display from server folder it not be display my code is as follow : Dim photo As String = "JC001924.jpg" Dim strimage As String = "~/SchoolFeeCollection_lalit1/Photos/JC001924.jpg" '"~/Photos/" & photo Image1.ImageUrl = Server.MapPath(strimage)
I might be missing something blindingly obvious here but you don't need to call Server.MapPath when setting an image url. Server.MapPath will give you the physical location on the server disk which is useless when the web page is sent to the client.
-
Respected, Hi sir ,I am save the image on server folder when I retrieve image for display from server folder it not be display my code is as follow : Dim photo As String = "JC001924.jpg" Dim strimage As String = "~/SchoolFeeCollection_lalit1/Photos/JC001924.jpg" '"~/Photos/" & photo Image1.ImageUrl = Server.MapPath(strimage)
Server.MapPath
will return the actual physical path which wont work as an image url. If you want to generate the virtual path at run time usePage.ResolveClientUrl
method instead."Never put off until run time what you can do at compile time." - David Gries, in "Compiler Construction for Digital Computers", circa 1969.
-
Your variable strimage returns correct path?! It seems to me that isn't correctly initialized.
I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post. www.aktualiteti.com
Thanks