• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 42
  • Last Modified:

image in GridView


I was wondering if EE can tell me how to display a static image in a GridView and also a link. Here is what I have, I would like to replace IMAGE_HERE with a static image. thanks

                    <asp:TemplateField HeaderText="" SortExpression="" HeaderStyle-Width="10px">
                            <asp:LinkButton ID="myid" CommandArgument='<%# Eval("myid") %>' CommandName="name" runat="server" Visible="true">IMAGE_HERE</asp:LinkButton> 

Open in new window

1 Solution
Ryan ChongCommented:
since it's static, just replace IMAGE_HERE with HTML code of image, like:

<asp:LinkButton ID="myid" CommandArgument='<%# Eval("myid") %>' CommandName="name" runat="server" Visible="true"><img src="https://www.google.com.sg/images/branding/googlelogo/2x/googlelogo_color_120x44dp.png" /></asp:LinkButton>

<img src="url"> 

Open in new window

HTML Images
mcrmgAuthor Commented:
thank you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now