I've got a situation (a key-based search) where I'm going to have multiple inputs of varying, but constrained, length. So I'm building a common control to use for each input, and this control has a TextBox for use when the input type is free-form text. In that case I'd like the length of the TextBox to reflect the constraint placed on the input based on the TextBox's MaxLength property (or at least on a maximum length of some sort).
How can I do this? I realize this is technically impossible with variable width characters, but I'm interested in getting close. The fields vary in maximum length from 3 characters to around 90.