c# - Why is img src not working as <asp:Image ImageUrl does -


I am currently trying to get an IMG tag to show the image so that its SRC property is set to You can.

I am using ASP: ImageButton as:

ASP: ImageButton ID = "image" runat = "server" image URL = '& lt;% #' image / " + Ewal ("CarmenId") + ".jpg"%> 'Optional Text = "No Image Was Found" />

This image was shown correctly but I clicked on the Image Button for some JavaScript I thought that you can not set a 'click' property for javascript, but only the code behind it, so I A standard HTML has been changed to IMG:

img alt = "no image was found" src = '& lt;% #' images "" + "Eval (" CarMakeId ") +" .jpg "%> 'Onclick =" openwindow (' test message '); On returning; "/>

Now I can use javascript to open the window, but the image for the image is not found.

Will anyone tell me what I

runat = "

Server ... to your and lt; img ... / & gt; element. This is then available in your class as a HtmlImage That's why, if you call it as HtmlImage myimg Sit up, you can set myimg its source category Src = "..." .


Comments