S
sql
Hi all,
I would like to set MaxLength property of asp.net controls on my page
based on their corresponding field length in Sql Server table. I know I can
get the TableSchema along with the record if I read the data into a DataSet.
But I don't want to store data in a DataSet because I am going to work on
only one record. So I don't want the overhead that comes with using a
DataSet. I will probably use a custom entity object and fill it using a
DataReader. I know how to do that. But now the question is what is the best
possible way to set MaxLength property of the controls on my page. I do not
want to hardcode the values in my page. Can anyone please throw some light
or provide sample code?
Thanks in advance.
I would like to set MaxLength property of asp.net controls on my page
based on their corresponding field length in Sql Server table. I know I can
get the TableSchema along with the record if I read the data into a DataSet.
But I don't want to store data in a DataSet because I am going to work on
only one record. So I don't want the overhead that comes with using a
DataSet. I will probably use a custom entity object and fill it using a
DataReader. I know how to do that. But now the question is what is the best
possible way to set MaxLength property of the controls on my page. I do not
want to hardcode the values in my page. Can anyone please throw some light
or provide sample code?
Thanks in advance.