CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 10/21/2007 1:47:43 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 4 Views: 88 Favorited: 0 Favorite
5 Items, 1 Pages 1 |< << Go >> >|
Smithy
Asp.Net User
Visual Web Developer Express - Image Display Problem10/21/2007 1:47:43 PM

0

Hi There.

I have added an image control to my master webpage and have linked the URL to an image (JPEG) file that resides in the \Images folder.

In the design view, the image is not available (red cross). When I display the page in the browser, I get the red cross. When I open the image in the solution explorer, the image displays.

The image was initally stored in the \APP_DATA\IMAGES folder but I have moved it into the \IMAGES folder off of the root of the web page, but I still get the same problem.

When I created the image control I did the following:

- dragged image control onto master page

- add existing item in solution explorer and browsed to the image

- selected the image in the ImageUrl property of the control.

If I put the full path to the image in my browser, I get the same thing (red cross) whereas before I moved it out of APP_DATA I was getting 403: forbidden.

Any suggestions appreciated.

Cheers

Smithy

Amanda Wang - M
Asp.Net User
Re: Visual Web Developer Express - Image Display Problem10/23/2007 9:19:56 AM

0

Hi Smithy,

Which image control did you use? The ASP.net 2.0 standar control ot the html image control.

If you use the html image control, use the  full path like this:  <img src="~/Image/007801.gif" />, it will not work, because the "~" is used for the server side control, you should add the runat="server" for the html image control.

For example:  <img src="~/Image/007801.gif"  runat="server"/>.

If this cannot help you solve your problem,  could you please post the related code here for further helps.

Hope it helps.  


Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
bluemono
Asp.Net User
Re: Visual Web Developer Express - Image Display Problem10/23/2007 2:18:53 PM

0

I've recently come across this issue too, I fixed it by using the <asp:Image Tag

So you need to use <asp:Image runat="server" ImageUrl="~/image/007801.gif"/> 

The tilde tells the app to use the root dir no matter where you are in the site structure so it can map the image from anywhere within the site.

Hope this helps you 

Smithy
Asp.Net User
Re: Visual Web Developer Express - Image Display Problem10/23/2007 10:07:25 PM

0

 

Thanks Amanda.

When I hover over the image control in the toolbar it just says "Image" whereas all of the other controls say for example "Hidden Field 2.0.0.0".

The other strange thing that I noticed as that all of the articles and posts that I have read reference the ImageSrc - but when I add the control in through design view, there is no mention of the ImageSrc in the source view.

The original source was the first line below, and I tried adding in the second line with the ImageSrc but I still get the same thing.

&nbsp;&nbsp;&nbsp;<asp:Image ID="Image1"  runat="server" ImageUrl="~/Images/m1000.jpg" /><br />

&nbsp;&nbsp;&nbsp;<asp:Image ID="Image1" ImageSrc="~/Images/micros.jpg" runat="server" ImageUrl="~/Images/m1000.jpg" /><br />

 I have been able to add various other images so far, and they all display - except for this one. However, this is the only image that I have added to the master page, but I have tried adding it to other pages in the content place holder, but it still does not display.

I did add in the full path to the JPG file and it still does not display

i.e. ImageUrl="C:\Documents and Settings\Administrator\My Documents\My Webs\WebSite2\Images\micros.jpg"

Thanks for your help

 Cheers

Amanda Wang - M
Asp.Net User
Re: Visual Web Developer Express - Image Display Problem10/24/2007 3:21:41 AM

0

Hi Smithy,

Smithy:

The other strange thing that I noticed as that all of the articles and posts that I have read reference the ImageSrc - but when I add the control in through design view, there is no mention of the ImageSrc in the source view.

The original source was the first line below, and I tried adding in the second line with the ImageSrc but I still get the same thing.

]&nbsp;&nbsp;&nbsp;<asp:Image ID="Image1"  runat="server" ImageUrl="~/Images/m1000.jpg" /><br />

&nbsp;&nbsp;&nbsp;<asp:Image ID="Image1" ImageSrc="~/Images/micros.jpg" runat="server" ImageUrl="~/Images/m1000.jpg" /><br />

From the code we can see, you used the server image control <asp:Image , the property is used to show the image's url is the imageURL.  As you said the ImageSrc is the html image control, it uses the src  to show the image's url. For example: <img src="../../image/007004.gif" mce_src="../../image/007004.gif" />.

Base on your code: <asp:Image ID="Image1"  runat="server" ImageUrl="~/Images/m1000.jpg" /><br />, dose the image show the image correctly?

 

 


Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning ASP.NET 2.0 Authors: Chris Hart, John Kauffman, Chris Ullman, David Sussman, Pages: 759, Published: 2005
Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express Edition Starter Kit: visual web developer 2005 express edition starter kit Authors: David Sussman, Alex Homer, Pages: 312, Published: 2005
Visual Web Developer 2005 Express Edition For Dummies Authors: Alan Simpson, Pages: 358, Published: 2005
Beginning DotNetNuke 4.0 Website Creation in C# 2005 with Visual Web Developer 2005 Express: From Novice to Professional Authors: Nick Symmonds, Pages: 391, Published: 2006
Beginning DotNetNuke 4.0 Website Creation in VB 2005 with Visual Web Developer 2005 Express: From Novice to Professional Authors: Nick Symmonds, Pages: 448, Published: 2006
Beginning Visual Web Developer 2005 Express: From Novice to Professional Authors: Paul Sarknas, Pages: 334, Published: 2005
Programming ASP.NET AJAX Authors: Christian Wenz, Pages: 454, Published: 2007
Simply Visual Basic 2008 Authors: P. J. Deitel, Deitel & Associates ,Inc. Staff, G J Ayer, Pages: 896, Published: 2008
Visual C# 2005: How to Program Authors: Harvey M. Deitel, Paul J. Deitel, Pages: 1591, Published: 2006
C# for Programmers: Updated for C# 2.0 Authors: Paul J. Deitel, Pages: 1317, Published: 2005

Web:
Visual Web Developer Express - Image Display Problem - ASP.NET Forums Visual Web Developer Express - Image Display Problem. Last post 10-23-2007 11:21 PM by Amanda Wang - MSFT. 4 replies. Sort Posts: ...
Visual Web Developer Express - Image Display Problem - ASP.NET Forums Re: Visual Web Developer Express - Image Display Problem ... Re: Visual Web Developer Express - Image Display Problem ...
Visual Web Developer Team Blog : Visual Studio 2008 SP1 Beta Visual Web Developer Express now comes with the SQL Server 2008 Express Beta .... the image would not always display correctly in the designer. ...
.NET MINI PROJECT VISUAL WEB DEVELOPER EXPRESS EDITION NET MINI PROJECT. VISUAL WEB DEVELOPER EXPRESS EDITION ... View comprehensive DVDs’ list : display picture, title, description, director, genre, ...
Microsoft, Visual Web Developer, Express 2005 : developer, web Microsoft Visual Studio Express. Tags: developer, web. In VWD I'm trying to display a message in a label following a button click on a form. ...
Amazon.com: Wrox's ASP.NET 2.0 Visual Web Developer 2005 Express ... NET 2.0 Website Programming: Problem - Design - Solution (Programmer to ... Microsoft Visual Web Developer(TM) 2005 Express Edition: Build a Web Site Now ...
How to Create Dynamic Pages on Visual Web Developer Express 2005 ... Oct 2, 2007 ... How to Create Dynamic Pages on Visual Web Developer Express 2005 .... Matej Kasper replied to Help to create image Galler. ...
Why Do I Get Unexpected 404 Errors in Visual Web Developer 2005 ... NET 2.0 using Web Developer express 2005. every thing is ok on the my ... Can't see the text on the image? Click the New Image button to display a new image ...
Tier1 Introduction to Visual Web Developer 2008 Express Edition ... information that describes how to display and present that text (which is defined using CSS). ...
Visual Web Developer Team Blog I wrote a simple Silverlight demo of using data grid control to display stock quotes ..... If you are using Visual Web Developer Express, you have much less ...

Videos:
Long Beach City Council Meeting Long Beach City Council Meeting












lossing my touch..

i can not open and run the project dotnetnuke 3.0.13! help me!

could not find file siteurls.config

new to dnn, am getting sql errors

setting up a child portal for a client

first login

how to debug desktopmodules (c# web user controls) with dotnetnuke project

can't install - object reference not set to an instance of an object.

how to set portal add new setting

host and admin menu not working on clean install of 2.1.2

role member emails

how to format [currentdate] control

installing dnn

ok - moved from full source to install version after reading blog -now this error

assembly error in new .netnuke 4.3.1 install

dnn behind firewall

the dnn4 error report when i installed dotnetnuke_4.0.0_starterkit.vsi

problem installing dotnetnuke 4.0 with framework 2.0

upgrade to 3.1 links not working

please help to run this asp application.

vs project reference problem

edit feature on modules is disabled

3.2.1. installation problems...

can't install on drive other than c:

help upgrade 3.0.1 to 3.1.1

neither aspnet nor nt authority\network service account exit for install on xp?

problem with installing dotnetnuke 3.1.1

customerrors mode="off"

compilation error please help me

ddn stops with the assembly version ( [assemblyversion] ) does not match the database version ( [databaseversion] ), tried a lot...

strange "thing" during installation of dotnetnuke

help me

subdomain administration

display of updated info...not happening, why?

no newsletter

modules and file uploads issue

url link and page name

upgrade from dnn 2.1.2 to dnn 3.0.13 problem

small vb.net app - encapsulate into dnn module?

please help this asp newb.

user timeout

portal migration

how to access the child portals directly?

vertical menu layout

newbie question

multiple sites

i need your expertise for my dotnetnuke 4.0 questions

grrr... moving on to 3.x beta

dnn installation and setup

how to host donetnuke

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT