Image Not Found: HTMLINPUTIMAGE CONROL

jmohan

Member
Joined
Jun 6, 2008
Messages
7
Programming Experience
Beginner
Hi everyone,

I have added an jpeg image file under the App_code/images folder and used the following code,

<input type="image" runat="server" id="BTNIMAGE"
src="~/DSC00430_2_edited.jpg" />

While executing, the image is not found in the page.

I have tried ../DSC00430_2_edited.jpg, and "DSC00430_2_edited.jpg". But nothing works.

Please give me your valuable suggestion for the solution.

Thank You.
jmohan :)
 

nayanpatel

Active member
Joined
Nov 18, 2016
Messages
27
Location
ahmedabad
Programming Experience
3-5
Instead of using only image name to get image , you have to pass path of the located image file to html page and use Server.Mappath to display image.

Ex:

Server.MapPath("path of your image file here.").
 
Top Bottom