473,322 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

loading image url in webapplication

Hi all,
I am using Microsoft Visual Studio 2008. I want to insert an image in picture box.Image is in the .gif format and its inside App_data/Pictures of my Webapplication. Whenever am going to ImageUrl its showing Pictures folder as empty, though there is an image in it. How do i insert the image in picture box?
Mar 4 '12 #1
4 3045
Frinavale
9,735 Expert Mod 8TB
Do not put pictures in the App_Data folder. The App_Data folder is a special place used for data sources and it is not meant to be used for pictures.

Move the Pictures folder to the root of your application instead (or within a folder in the root of the application) and you should be able to display the images.

Besides that, there is no "PictureBox" control in ASP.NET.
There is an Image control that displays images.

Here is the ASP.NET Image control code to display an image with the name "myImage.gif" located in a folder called "Pictures" that is in the root director of your application:

Expand|Select|Wrap|Line Numbers
  1. <asp:Image id="theImage" runat="server" ImageUrl="Pictures/myImage.gif" AlternateText="My Image"/>
-Frinny
Mar 5 '12 #2
hi,
I deleted the pictures folder from App_data; i have added it in root folder. Image is coming at design time; but while building the project it shows the warning that image couldn't be found. The path couldn't be found. So, the image disappears from the site; when the project is running.
Mar 10 '12 #3
Frinavale
9,735 Expert Mod 8TB
What is the URL that you provided as the ImageUrl property for your Image control?

Did you move the image to the location where you published the application to?

-Frinny
Mar 12 '12 #4
the url i am using is:"Pictures/shehenai.bmp". I havn't understood your second question. I have renamed the WebApplication4 as Shehenai. But inside the Projects folder WebApllication4 is as it is; inside which i have Shehenai.csproj and Pictures folder.
Mar 13 '12 #5

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

Similar topics

2
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...
3
by: Bri | last post by:
AC97 on WinXP, Image control on a Form and on a Report. I have followed the advice on the following MVPS page: http://www.mvps.org/access/api/api0038.htm This states that after changing the...
1
by: agatha.life | last post by:
I did a javascript for the loading of images (I didn't want to have the images loaded in "on loading" because they are too many). The website is for a model and if you look at the codeof pages (...
2
by: brianflannery | last post by:
Greetings! My situation is this. I currently have a database of which in a form displays jpeg pictures (one at a time) which are linked to the db and stored in a separate folder. I have set up a...
0
by: atlkhan | last post by:
Hi I am loading bitmapdata from the library like this linkageId = "landscape"; myBitmapData = BitmapData.loadBitmap(linkageId); Than attach this bitmap image to a movie. mc =...
1
by: vjayis | last post by:
Hi I hav a page in which datas are displayed intially from the database. And using a link i m retriving datas from another page using ajax., it takes time and user might think tht nothing...
1
by: Phil Stanton | last post by:
Is there any way of stopping the cursor jumping to a point roughly in the middle of the screen when loading a new picture into an Image Control. The picture is linked and pulled from an external...
6
by: aaronkmar | last post by:
Trying to get a loading image to spin while the query is loading. I can get the data div to fade in, but I can't seem to figure out how to get the gif while the query is loading. I'm using two...
0
by: rishi goyal | last post by:
how to add image using in project which is loading image using LoadResPicture in vb6
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.