This question is locked. New answers and comments are not allowed.
Hi,
Is there a way to get field metadata properties programmatically?
For example, instead of hard coding a length, we would like to be able to set the maximum length of a text field based on the length of the database field. e.g. if I have a column called PersonName in the dadabase datatype=nvarchar(16), then in the text box displaying the name, I want to set the MaxLength to 16 in the code behind instead of hard code the control's property in the aspx page. This way, if the database definition changes, I don't have to manually set the value in each aspx page.
Thank you in advance, Eric.
Is there a way to get field metadata properties programmatically?
For example, instead of hard coding a length, we would like to be able to set the maximum length of a text field based on the length of the database field. e.g. if I have a column called PersonName in the dadabase datatype=nvarchar(16), then in the text box displaying the name, I want to set the MaxLength to 16 in the code behind instead of hard code the control's property in the aspx page. This way, if the database definition changes, I don't have to manually set the value in each aspx page.
Thank you in advance, Eric.