views:

52

answers:

1

Hello, I have an ASP.Net GridView and I want to include an Image and a Text in the same field, something like this:

<a id="lnkForJQueryCall"><img src="whatever.png"> Some Other Number</a>

I have found the asp:ImageField does not have a Property for adding a text at right or left of the image, and there are no much options, is there any way to achieve it?

[EDIT] I was thinking of a css class workaround but have not figured out how to do it !!

A: 

You can use a TemplateField to display custom content in a data-bound control such as a GridView.

<asp:TemplateField>
    <ItemTemplate>
        <a id="lnkForJQueryCall"><img src="whatever.png"> Some Other Number</a>
    </ItemTemplate>
</asp:TemplateField>
Phaedrus
mmm new trick... gonna try it
Jhonny D. Cano -Leftware-
It worked perfect, God Bless You !!!
Jhonny D. Cano -Leftware-