Get Field Size?

Posts   
 
    
Orion
User
Posts: 4
Joined: 18-Dec-2009
# Posted on: 18-Jan-2010 00:32:59   

So, I'm building an ASP.NET MVC Web App using LLBLGen to build my model. Particularly for strings, I need to specify the "maxlength" property in the HTML for the text input. Is there a way to programmatically get the maximum string length of fields in entities (as they come from the DB, so I want the number from something like say a varchar(12sunglasses etc)? Thanks

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 18-Jan-2010 03:00:52   

This is how: YourEntity_Fields._TheField.MaxLength For instance:

CustomerFields.CompanyName.MaxLength
David Elizondo | LLBLGen Support Team