How to set the maxlength of a textbox (in the EditTemplate of DataGrid) based on a field value in the record

Platform: ASP.NET|Category: DataGrid
<EditItemTemplate> 
<asp:TextBox runat='server' id='txtField' MaxLength=’<%# DataBinder.Eval(Container.DataItem, 'FieldSize') %>’ /> 
</EditItemTemplate>