473,387 Members | 1,512 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,387 software developers and data experts.

changing images in a gridview in asp.net 2.0

20
Hi,
I have a gridview. It has two columns.first column contains a thread.
Second column contains an image which is of type buttonfield to close this thread which is shown below.

The image is a key icon.
<asp:ButtonField ButtonType="Image" ImageUrl="~/Images/key.gif" CommandName="Close">
<ItemStyle HorizontalAlign="Center" Width="20px" />
</asp:ButtonField>


My doubt is before closing the thread the image should be key.gif
and after the event for closing the thread is completed
the image should change to some other gif for example lock.gif


That is,
before closing the thread one icon should appear and after closing the thread a different icon should appear on the same column in the gridview so that we can distinguish closed threads and unclosed threads.


Please help me by sending any example code.Waiting for your reply.

Thanks,
Silpa
Aug 7 '07 #1
1 995
kenobewan
4,871 Expert 4TB
After closing the thread can't you change the source of the image?
Aug 7 '07 #2

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

Similar topics

3
by: CLEAR-RCIC | last post by:
I have several images i want to display in an ASP.Net application. The images are being passed to me in binary format from another application. Is there a good way to write them directly to an...
0
by: Samy | last post by:
Hi There, I am trying to display images in a gridview and display only valid images from the html in the database (and not display spacers, 1x1 pixel images etc). For this, I have a gridview...
10
by: gnewsgroup | last post by:
I've googled and tried various approaches, but could not resolve this problem. The article at MSDN: Displaying Images in a GridView Column only presents a simple case where all data (including the...
4
by: Queen Soso | last post by:
hi all, I have this error when I click delete link in the gridview: 'unable to cast object of type 'ASP.WebForm1_aspx' to type "system.Web.UI.WebControls.GridviewRow' I really need help as...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
Oralloy
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,...

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.