User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 456,594 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,499 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 8568 | Replies: 1
Reply
Join Date: Jul 2004
Posts: 8
Reputation: snufse is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
snufse snufse is offline Offline
Newbie Poster

Use of Image control on Web Page

  #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.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Feb 2003
Location: Canada
Posts: 786
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Rep Power: 9
Solved Threads: 26
Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: Use of Image control on Web Page

  #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, Regional Pharmacy Information Systems
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 6:47 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC