Wrox Programmer Forums
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 4th, 2006, 02:42 AM
Registered User
Join Date: Sep 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to change an ASP: Image Url at runtime

Hello friends,
I have problem plz help..
I have a Datagrid and have to show a image in to a column.I have to change the Image Url at runtime that depends on Database value.
frnd I am not able to change the Url of ASP:image control.
Is it possible to do this by using HTML image control..
Plz give me a help regards this..


Old September 4th, 2006, 10:43 AM
Wrox Author
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons


I assume that the datasource you are binding the grid to contains the path of the image though.

In one of your datagrid columsn place an image control and, for the ImageURL property, do soemthing like this: '<%# Container.DataItem("ImageURL")%>' where ImageURL is the column that contains the path to your image.


"The one language all programmers understand is profanity."
Old September 5th, 2006, 03:44 AM
Registered User
Join Date: Sep 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

Yes its working.
Thanks alot dparsons.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change datasource of crystal report at runtime check123 Pro VB 6 1 March 21st, 2008 05:45 AM
Change URL SKhna ASP.NET 2.0 Basics 3 February 28th, 2008 01:25 PM
How to change file path to http url cJeffreywang BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 July 25th, 2007 12:18 AM
Change Schema URL maga2 XSLT 7 July 13th, 2005 04:46 AM
How to keep url end w/ index.htm when page change bekim HTML Code Clinic 3 January 25th, 2005 05:00 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.