Hello, I am new to ASP.NET and I am using a TemplateColumn in a datagrid as follows, but the width property seems to do nothing (really a pain when the image is large):
When I use an Image instead of a hyperlink, the width property works great, but then I lose the hyperlink capability. Am I doing something wrong, or does Width not really supposed to control the image width? Thanks for your help!
Code:
<asp:TemplateColumn HeaderText="My Image">
<ItemTemplate>
<asp:HyperLink ImageUrl='<%# DataBinder.Eval(Container.DataItem, "FilePath")) %>'
Width="100px"
NavigateUrl='[URL unfurl="true"]http://myPage.html'[/URL] Target=_blank Runat="server" />
</ItemTemplate>
</asp:TemplateColumn>