I'm sitting here working on a fairly simple data entry form for a web application, I'm populating a text box with the value from a SubSonic field and that old urge to set the max length kicked in. I dug around in the SubSonic object model for a little bit and came up with the following code.
txtFirstName.Text = buyer.FirstName;
txtFirstName.MaxLength = buyer.GetSchema().GetColumn("firstname").MaxLength;
as my buddy Tim says Schweet!

0 comments:
Post a Comment