Click here to Skip to main content
15,799,257 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using right code to show pic but it does not showing pic. Is there is my visual studio fault or any special changes required in visual studio.
is there any requirement of folder sharing which is outside the website folder.

What I have tried:

Code is..
<asp:Image id="b1" runat="server" Alt="Pic" width="300" height="400" ImageUrl="q:/newfolder/1.jpg />"
Posted
Updated 7-Nov-17 21:16pm
v2
Comments

1 solution

Syntax error in this code:
ASP.NET
<asp:Image id="b1" runat="server" Alt="Pic" width="300" height="400" ImageUrl="q:/newfolder/1.jpg />"

correction is:
ASP.NET
<asp:Image id="b1" runat="server" Alt="Pic" width="300" height="400" ImageUrl="q:/newfolder/1.jpg" />

Quote:
q:/newfolder/1.jpg

Is not an URL, thus can't be used to access a file on server.
From client side point of view, this try to access a file on client computer, which is forbidden.
read link provided by Karthik Bangalore for more details.
 
Share this answer
 
Comments
Member 13509161 9-Nov-17 3:53am    
Thanks sir
<asp:Image id="b1" runat="server" Alt="Pic" width="300" height="400" ImageUrl="q:/newfolder/1.jpg" />

I use this with your correction but it still not working. It shows only alternate text, pic not showing.
Patrice T 9-Nov-17 3:59am    
That is what I said in second part of my 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