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.


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

Open in new window

Who is Participating?
JamesAStewartConnect With a Mentor Author Commented:
I have chosen to use the following code:
    <asp:Image ID="thumbNail" ImageUrl='<%# eval("fileLoc","./streamFiles/streamJPEG.aspx?reqFLc={0}") %>' runat="server" Width="<%# Profile.osc_thumbX.ToString %>" Height="<%# Profile.osc_thumbY.ToString %>" />

Open in new window

Haris VCommented:
please check this link,
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.