Ok a few things. What web browser are you using to view it in? Is the browser set to accept inline images? Is the image file name exactly as you have coded it (i.e. Not Logo.jpg, or LOGO.jpg, or logo.JPG)?? Try placing the Image in the same directory as your application, and change the code to Image1.ImageUrl = "logo.jpg" and see if that works.
Sub [B]Switch_Image[/B] (Src As Object, Args As EventArgs)
If MyImage.ImageURL = "aspnet2.gif" Then
MyImage.ImageURL = "xhtml.gif"
MyImage.ImageURL = "aspnet2.gif"
<asp:Button Text="Switch Image" OnClick="Switch_Image" Runat="Server"/>
<asp:Image id="MyImage" Runat="Server"
Hope this helps! :cool:
I have a web page that will display an image (ie a logo).
I am using the following code but the image is not being displayed in the image control.