Click here to Skip to main content
15,905,867 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
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
Comments
bbirajdar 10-Jun-12 7:55am    
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 10-Jun-12 8:19am    
Boss , am fresher
preet88 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

hi,
you can use TemplateField in that particular cell to define every collection of controls in that cell. Here is a sample:

ASP.NET
<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
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900