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

Dynamically set the size of thumbnails in a gridview

I am using a gridview to display images.

I would like to set the image sizes to the value stored in profile_thumbX and profile_thumbY however I'm struggling to find a solution.

TIA

James
Using VB ASP.Net V2.0 SP1
<asp:ImageField DataImageUrlField="fileLoc" DataImageUrlFormatString="./streamFiles/streamJPEG.aspx?reqFLc={0}" HeaderText="ThumbNail" ShowHeader="false">
<asp:ImageField>

Open in new window

0
JamesAStewart
Asked:
JamesAStewart
1 Solution
 
Haris VCommented:
please check this link,
1.http://forums.asp.net/t/1031180.aspx
0
 
JamesAStewartAuthor Commented:
I have chosen to use the following code:
<asp:TemplateField>
<ItemTemplate>
    <asp:Image ID="thumbNail" ImageUrl='<%# eval("fileLoc","./streamFiles/streamJPEG.aspx?reqFLc={0}") %>' runat="server" Width="<%# Profile.osc_thumbX.ToString %>" Height="<%# Profile.osc_thumbY.ToString %>" />
</ItemTemplate>
</asp:TemplateField>

Open in new window

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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