Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I access the entity object from a textbox event?
Message
From
27/06/2008 21:56:05
 
 
To
27/06/2008 19:51:11
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01327405
Message ID:
01327428
Views:
11
>Hi Sam,
>
>>I have an event handler on a form that handles the validating event for a textbox on that form. From within that event handler method I need to access the entity object property that the textbox is bound to. Can somebody please help me with some code that would allow me to do that.
>>
>>Thanks in advance.
>>
>Do you have multiple business objects registered with this form? If you know what the business object is you can use this.oMyBizObj.Entity but I suspect your question is more complicated than this. Are you trying to access the entity object by interrogating the textbox somehow to find the business object associated with it?
>
>Tim

Hi Tim,

Thanks for your quick reply and congratulations on your new MVP status. You are right, my question is more complicated. I am working on a special new textbox control and when a user attempts to leave the textbox I need to look at the underlying entity property that it is bound to. I need to do this in the validating event handler before the framework puts the new changed value into the entity property. For example: A user enters the textbox and it shows "abc" in the text property before the user makes any changes and then the user changes the text to "xyz" and attempts to leave the textbox. At that point before the framework puts the "xyz" into the entity property that the textbox is bound to, I need to see that "abc" is still in the entity property. There may be multiple business objects involved with the form.

Any ideas?

Sam Tenney
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform