473,497 Members | 2,190 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

image does not load in image control

parshupooja
159 New Member
Hey All,

I m using asp.net

I have image control on page and I want to load image in it but image does not resides in root of application instead it is on C drive. This is the path

C:\Documents and Settings\User\My Documents\My Pictures\tree.gif

I tried using several things but does'n work

image1.imageurl = "C:\Documents and Settings\User\My Documents\My Pictures\tree.gif ";

string path = "C:\Documents and Settings\User\My Documents\My Pictures\tree.gif ";

image1.imageurl = server.Mappath("C:\Documents and Settings\User\My Documents\My Pictures\tree.gif");

plz help
Nov 9 '07 #1
5 2387
nateraaaa
663 Recognized Expert Contributor
Why not copy the image to your project?

Nathan
Nov 9 '07 #2
parshupooja
159 New Member
Thats another story, images will keep changing quater by quater

Why not copy the image to your project?

Nathan
Nov 9 '07 #3
Plater
7,872 Recognized Expert Expert
You generally cannot access files outside of the web root by direct means.

What you can do is make an intermediary aspx page, whos job it is to "serve up" the image, aka read the image from the harddrive and then return it as page content.

Then you would set your image control url to be like "MyIntermedPage.aspx?image=tree.gif"
Nov 9 '07 #4
nateraaaa
663 Recognized Expert Contributor
Thats another story, images will keep changing quater by quater
Can't you write some code to determine which quarter you are in and display the appropriate image stored in your project?
Nov 9 '07 #5
parshupooja
159 New Member
HEy Guys thanks for anticipation

Here is my original Post. I am working on dynamic application. Images in each quater folder will keep changing every year. so i can not include all quaters images
in my project.

http://www.thescripts.com/forum/thread733305.html

Thanks again
Nov 9 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

4
8363
by: Kevin Myers | last post by:
Hello, Please forgive my reposting of this note with hopefully a more relevant subject line. On an Access 2000 form under Windows 2000 I would like to use a Kodak Image Edit Control to...
3
3006
by: Scott Simonson | last post by:
I have had an application in MSAccess 2k for about year now without issues until recently. My users were using it in W98 without issue, but recently moved to WindowsXP and now are getting an...
3
13359
by: Alberto | last post by:
I'm trying to load an image in a PictureBox but I want the PictureBox has always the same size and if the image is bigger, show a scrollBars. How can I do it? Thank you
12
6161
by: Sharon | last post by:
I’m wrote a small DLL that used the FreeImage.DLL (that can be found at http://www.codeproject.com/bitmap/graphicsuite.asp). I also wrote a small console application in C++ (unmanaged) that uses...
10
4127
by: David W. Simmonds | last post by:
I have a DataList control that has an Image control in the ItemTemplate. I would like to resize the image that goes into that control. I have a series of jpg files that are full size, full...
2
1642
by: Irfan Akram | last post by:
Hi Guys, I asked this question yesterday, but have not yet received a suitable answer. I hope you guys can help me out. I want to load an image on to a web-page. The image is alreday stored in...
1
9462
by: Brian | last post by:
Using A2K I have an image control on a report and use code to set the image.picture to the required jpg. 3 of the jpgs resize properly but 2 do not - they display much smaller than the image...
6
6426
by: Mark Denardo | last post by:
My question is similar to one someone posted a few months back, but I don't see any replies. Basically I want to be able to have users upload photos and save them in a database (as byte data)...
4
11125
by: MikeB | last post by:
Hello All, want to be able to pull images from the database and load them into a bitmap through a stream which I have working. I then want to take the bitmap and load it into a Image control...
6
1501
by: Jerry West | last post by:
I'm a newbie to .NET from VB6. I have a Form with a Panel control on it. When the Form loads it maximizes and so does the Panel control. I then fill an array with the path to images at a...
0
7120
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6991
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7196
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6878
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4897
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3088
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.