Verwenden Sie System.Web.UI.WebControls.Unit.Parse
Methode:
<asp:Image
ID="Image1"
runat="server"
Width='<%# System.Web.UI.WebControls.Unit.Parse(Eval("ImageSize").ToString()) %>'
ImageUrl="~/Images/ProgressBar.jpg"/>
Verwenden Sie System.Web.UI.WebControls.Unit.Parse
Methode:
<asp:Image
ID="Image1"
runat="server"
Width='<%# System.Web.UI.WebControls.Unit.Parse(Eval("ImageSize").ToString()) %>'
ImageUrl="~/Images/ProgressBar.jpg"/>