Im having a problem forming the correct EVAL statement to change the Height / Width of an image button
from the stored info in a database.
Values in the database are in string format "120px" etc.
<asp:ImageButton ID="ImageButton1" runat="server" Width='<%# Eval("width") %>'
Height='<%# Eval("height") %>' ImageUrl='<%# Eval("Image_Name") %>'
keep getting this error:
Exception Details: System.InvalidCastExceptio
n: Specified cast is not valid.
Start Free Trial