Click here to Skip to main content
15,896,118 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

When i use ImageURL in the ItemTemplate in the GridView, I am getting
Error "there was an error rendering the control".

I am not able to see GridView Design. Below the code sample.

<itemtemplate>
   <asp:HyperLink ID="HyperLink2" runat="server" onclick="" ImageUrl="images/Access.gif" >                        
</itemtemplate>


Pls. Help to resolve this.

Thanks.

Ganesh.S
Posted
Updated 21-Jun-11 23:05pm
v2
Comments
Sergey Alexandrovich Kryukov 22-Jun-11 14:11pm    
Tag properly! ASP.NET? Tag it.
--SA

1 solution

Try changing
<asp:HyperLink ID="HyperLink2" runat="server" onclick="" ImageUrl="images/Access.gif" >
To
<asp:HyperLink ID="HyperLink2" runat="server" onclick="" ImageUrl="~/images/Access.gif" >
 
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