|
-
Jul 9th, 2010, 04:37 AM
#1
Thread Starter
Not NoteMe
[RESOLVED] Programatically determine bindings on a textbox
I have a method that takes a LINQtoSQL object and a field name and will tell me the length of that field based on the attributes of that field within the class object.
I want to use this method to set the maxlength of any bound textboxes in a gridview.
I can loop through all textboxes, and if the textbox created from a bound field then i can get at the fieldname ok, however if it's created from a template i can't find any way of getting to the field name the textbox is bound to (since a template isn't bound to anything).
What i'm after is a way of getting the field name the Text property of a TextBox is bound to in (ideally) any case, not just the case where it was created from a bound field.
Any help would be great, if you want to answer in code c# or VB.NET is fine.
Last edited by SLH; Jul 12th, 2010 at 08:03 AM.
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|