Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Image server control - where am I going wrong?

Reply
Thread Tools

Image server control - where am I going wrong?

 
 
John Austin
Guest
Posts: n/a
 
      07-26-2006
I thought I would experiment for the first time with an Image standard
control in VS 2005. I pressed create web site, I copied a jpg into the
App_Data folder, added an image control to Default.aspx and set the ImageUrl
to the jpg ( ~/App_Data/Picture.jpg ). The picture appears in the designer,
but when I run the page there is no picture.

What am I doing wrong - I have no idea!
--
John Austin
 
Reply With Quote
 
 
 
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      07-26-2006
John Austin wrote:
> I thought I would experiment for the first time with an Image standard
> control in VS 2005. I pressed create web site, I copied a jpg into the
> App_Data folder, added an image control to Default.aspx and set the
> ImageUrl to the jpg ( ~/App_Data/Picture.jpg ). The picture appears
> in the designer, but when I run the page there is no picture.
>

There was no way for you to know it (except maybe by browsing through some
of the previous questions before posting yours - always a recommended
practice) , but this is a classic asp newsgroup. ASP.Net bears very little
resemblance to classic ASP so,
while you may be lucky enough to find a dotnet-knowledgeable person here who
can answer your question, you can eliminate the luck factor by posting your
question to a group where those dotnet-knowledgeable people hang out. I
suggest microsoft.public.dotnet.framework.aspnet.


Don't use the App_Data folder. Create a folder called images and put the
image file in that folder.
From http://msdn2.microsoft.com/en-us/library/445z2s49.aspx:
When you create a Web site in Visual Web Developer, Visual Web Developer
creates a folder named App_Data below the current root folder. The folder is
designed to be a store for application data, including Access databases. The
App_Data folder is also used by ASP.NET to store databases that the system
maintains, such as the database for membership and roles. When Visual Web
Developer creates the App_Data folder, it grants Read and Write permissions
for the folder to the ASPNET or NETWORK SERVICE user account.

Note
As a security measure, files in the App_data folder are not served by
the Web server. Do not store any Web pages in the App_Data folder, because
users will see an error if they request a page from that folder.



--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"


 
Reply With Quote
 
 
 
 
Walter Wang [MSFT]
Guest
Posts: n/a
 
      07-27-2006
Thanks Bob for your excellent and professional answer.

Hi John,

Thank you for using MSDN Managed Newsgroup Service!

The reason why we recommend posting appropriately is you will get the most
qualified pool of respondents, and other partners who the newsgroups
regularly can either share their knowledge or learn from your interaction
with us. Thank you for your understanding.

Regards,
Walter Wang ((E-Mail Removed), remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OT: Windows XP: Going, going ... gone? OTHMAN MCSE 2 03-25-2008 04:45 PM
XP search going all lame on me..explorer going crazy when trying tosearch. fotoobscura Computer Support 8 01-12-2008 01:09 AM
Firefighters at the site of WTC7 "Move away the building is going to blow up, get back the building is going to blow up." Midex Python 24 05-07-2007 04:23 AM
floppy drive just keeps on going and going and ... Weylon Bulloch Computer Support 1 09-07-2003 07:17 AM
VPN going up but traffic going one way PLP Cisco 1 07-11-2003 08:28 AM



Advertisments