Groups | Blog | Home
all groups > asp.net webcontrols > november 2004 >

asp.net webcontrols : databinding


delphiconsultingguy NO[at]SPAM yahoo.com
11/30/2004 12:42:54 PM
Hi all,

I have a dataSet containing a table. I want to create a Web
application with textboxes that are attached to fields in the
dataSet's table, such that data entry is filtered by the datatypes of
those fields (e.g. 'age' text box only accepts numbers because its
field is integer). Is there any way to have this form of strong
typing driven by the table's individual fields' datatypes?

thanks,
Elliot Rodriguez
11/30/2004 6:21:57 PM
At a first pass, what if you created Validator controls at runtime that
mapped to your data fields and their expected types?

You wont be able to do this "intrinsically", by that I mean expect the
boxes to accept or reject input simply based on the datatype that its
bound to. You'll have to throw Validators in somewhere along the line to
ensure expected datatypes are input.

[quoted text, click to view]
delphiconsultingguy NO[at]SPAM yahoo.com
12/2/2004 9:08:56 AM
[quoted text, click to view]

I was afraid of this. Thanks for the dynamic Validator idea though!

Nicole Schenk
12/4/2004 8:14:35 AM
[quoted text, click to view]
There is nifty SmartDate class in Rockford Lhotka Expert C# Business Objects
that does what you want for dates. The same idea would be needed to handle
nulls for integers or floats (what is a null represented as an integer or
AddThis Social Bookmark Button