Use of Image control on Web Page

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Jul 2004
Posts: 8
Reputation: snufse is an unknown quantity at this point 
Solved Threads: 0
snufse snufse is offline Offline
Newbie Poster

Use of Image control on Web Page

 
0
  #1
Aug 5th, 2004
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.

Image1.ImageUrl = "C:\logo.jpg".

Thanks.
Reply With Quote Quick reply to this message  
Join Date: Feb 2003
Posts: 793
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Solved Threads: 26
Team Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: Use of Image control on Web Page

 
0
  #2
Jun 24th, 2005
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.

Try looking at this LINK

Sub Switch_Image (Src As Object, Args As EventArgs)
  If MyImage.ImageURL = "aspnet2.gif" Then
    MyImage.ImageURL = "xhtml.gif"
  Else
    MyImage.ImageURL = "aspnet2.gif"
  End If
End Sub

<asp:Button Text="Switch Image" OnClick="Switch_Image" Runat="Server"/>
<asp:Image id="MyImage" Runat="Server"
  ImageURL="aspnet2.gif"
  ImageAlign="Top"/>

Hope this helps!

Originally Posted by snufse
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.

Image1.ImageUrl = "C:\logo.jpg".
Assistant Manager, Pharmacy Informatics
Wordpress Learning Blog
Updated : ASP.Net Login Code
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC