473,883 Members | 2,268 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

setting an image control imageurl and displaying picture


I have a situation where I set the image1.imageurl value in the codebehind,
but the image doesn't update to be the new image, its just stays as it was.

Is there some event i must fire to make the image control display the proper

Jul 26 '06 #1
2 1701
If the image file name stays the same even if image itself has been updated
it is not going to work. The browser is using ht eimage from cache.
Is this what you are running into?

"Aussie Rules" <Au*********@no spam.nospamwrot e in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..

I have a situation where I set the image1.imageurl value in the
codebehind, but the image doesn't update to be the new image, its just
stays as it was.

Is there some event i must fire to make the image control display the
proper image...


Jul 26 '06 #2
Try something like:

myImageCtrl1.Im ageUrl = "images/test.gif?id="+D ateTime.Now.Tic ks.ToString();


Co-founder, Eggheadcafe.com developer portal:

"Aussie Rules" wrote:

I have a situation where I set the image1.imageurl value in the codebehind,
but the image doesn't update to be the new image, its just stays as it was.

Is there some event i must fire to make the image control display the proper

Jul 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: David W. Simmonds | last post by:
I know that I can create an Image object by using a path like C:\MyPictures\pic.jpg, but how can I create an Image object by using a path like /MyPictures/pic.jpg where the path is relative to the site. For instance, if the site is http://www.foobar.com, then /MyPictures/pic.jpg would be fully qualified by http://www.foobar.com/MyPictures/pic.jpg. Presumably there is a way to get the fully qualified path by giving the relative path.
by: Jason | last post by:
I am trying to display images with image controls but browsers are only displaying half of the image. Every time the user refreshes it shows a little more of the picture. I am using Windows XP with IIS and I checked the logfile. It says: 00:18:17 GET /Webapplication1/WebBar.gif 206 I checked what 206 is and it says that it means partial content. All I can find on this is that I must have specified a range but I don't...
by: Scott Schluer | last post by:
Is there a way to use the Image class to convert a color photo (GIF or JPEG) to a B&W photo? Thanks, Scott
by: Andrew | last post by:
Hi, How do I display a single image in a repeater control ? I only have 1 picture to display for ONE of my records. TIA. Andrew.
by: Mark Denardo | last post by:
I created a Web Image "<asp:Image ID="Image1" ..." that my code behind set to a certain image file say image1.jpg =Image1.ImageUrl = "<rel_path>/image1.jpg"; which set the image ok, but then I replaced that image file with another image file and gave it the same name "image1.jpg". But my web app when it loads the image when I run the page still shows the original picture that I deleted and replaced with the new one, even though I...
by: rascalking | last post by:
Hello, So I've read many forums that explained how to get an image out of SQL Server database and display it. I used an alternate .aspx page to retrieve the image and write it back as binary which everyone on many sites said to do. The problem is its not working. My exact situation is that I am creating News Articles based on news entries which are either text or pictures. I want to display a picture in the datagrid if there is one....
by: Christian | last post by:
Hi, i added an image in my Solution in folder Resources and now i will open... Someone can help me? thanks
by: =?Utf-8?B?R3V5?= | last post by:
I'm trying by means of a FileUpload control and and "Apply" button, brwosong my local folders for a picture file loading (Apply button) and displaying the (local) picture (jpg, gif, ..) file. I don't want the local file to be saved on the server but displayed on my webform and if ok be stored in my database together with other related info. I googled and found some example .. but not exactly what i want to achieve. Anyone can give me a...
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine when iam using a normal web page... but can't in content page.... Code in Master Page <%@ Master Language="C#" AutoEventWireup="true" CodeFile="submaster.master.cs" Inherits="submaster" %> <%@ Register Assembly="AjaxControlToolkit"...
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
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.