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

JamesAStewartAsked:
Who is Participating?
 
JamesAStewartConnect With a Mentor Author 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
 
Haris VCommented:
please check this link,
1.http://forums.asp.net/t/1031180.aspx
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.