Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET SQL-Server
Dear Friends,
 
I have a Gridview in my project.
 
In the 2nd cell of Gridview am using hyperlink. So left side of hyperlink i need a small image of that product.
 
This column cell[2] consists of all Hyperlinks.
 
I need Small image leftside beside of hyperlink in that cell[2] only.
 
Please can u advice me how to do this /
thanks.
Posted 10-Jun-12 2:11am
Comments
   
What have you tried? Have you done any task till date without getting help from the codeproject ? People dont gather on codeproject to code for others but to help solve their "difficulties". Before posting the question you need to show them what you have tried...Is that clear ?
Ranjith Reddy CSE at 10-Jun-12 8:19am
   
Boss , am fresher
preet88 at 10-Jun-12 12:15pm
   
hi Ranjith Reddy i have seen your same kind of problems with different styles of questions, it'll be better for all of us to answer if you'll post your question in same thread.
however for this i have mentioned in other post you can use rowCommand event as well as rowBataBound event..
thanks

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

hi,
you can use TemplateField in that particular cell to define every collection of controls in that cell. Here is a sample:
 
<asp:templatefield runat="server" xmlns:asp="#unknown">
                    <itemtemplate>
                        <asp:image runat="server" imageurl="image1.gif" />
                        <a href="Default.aspx">Click here</a>
                    </itemtemplate>
                </asp:templatefield>
 

I hope it helps,
Cheers
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 350
1 Jochen Arndt 190
2 Richard MacCutchan 135
3 Sergey Alexandrovich Kryukov 120
4 DamithSL 95
0 OriginalGriff 6,045
1 DamithSL 4,611
2 Maciej Los 4,087
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,310


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 11 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100