T
trint
I have a gridview displaying images from sql server. The images are
all different sizes, so I want to display each image at only 70 pixels
wide with the right perspective of the height. here is my code that
displays them at 50%, which isn't what i want:
<asp:GridView ID="GridView3" runat="server"
AutoGenerateColumns="False" AutoGenerateSelectButton="False"
CssClass="basix"
DataKeyNames="id" OnSelectedIndexChanged="getSelected3" Width="25%"
BorderColor="ForestGreen" ForeColor="Black">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton
ID="Linkbutton1" runat="server" CommandName="select" Text='<%# Eval
( "name" ) %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle
Wrap="True" />
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton
ID="Imagebutton1" runat="server" alt='<%# Eval ( "name" ) %>'
CommandName="select"
ImageUrl='<%#
DetectImagePath(Eval("thumbnail")) %>' Width="50%" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<SelectedRowStyle
BackColor="White" Font-Bold="True" ForeColor="White" Width="25%" />
<AlternatingRowStyle
BackColor="LightGoldenrodYellow" ForeColor="Black" />
</asp:GridView>
Any help is appreciated.
Thanks,
Trint
all different sizes, so I want to display each image at only 70 pixels
wide with the right perspective of the height. here is my code that
displays them at 50%, which isn't what i want:
<asp:GridView ID="GridView3" runat="server"
AutoGenerateColumns="False" AutoGenerateSelectButton="False"
CssClass="basix"
DataKeyNames="id" OnSelectedIndexChanged="getSelected3" Width="25%"
BorderColor="ForestGreen" ForeColor="Black">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton
ID="Linkbutton1" runat="server" CommandName="select" Text='<%# Eval
( "name" ) %>'></asp:LinkButton>
</ItemTemplate>
<ItemStyle
Wrap="True" />
</asp:TemplateField>
<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton
ID="Imagebutton1" runat="server" alt='<%# Eval ( "name" ) %>'
CommandName="select"
ImageUrl='<%#
DetectImagePath(Eval("thumbnail")) %>' Width="50%" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<SelectedRowStyle
BackColor="White" Font-Bold="True" ForeColor="White" Width="25%" />
<AlternatingRowStyle
BackColor="LightGoldenrodYellow" ForeColor="Black" />
</asp:GridView>
Any help is appreciated.
Thanks,
Trint