Posted: Thu Dec 15, 2005 10:04 pm Post subject: Class validation with Web UI
I have a class called user
within the accessors of this class I have validation to ensure the format of the data is correct.
In my web UI i pass data from the web controls to these accessors. If there is an error with the data I want to highlight the control. I am thinking of throwing an event in the accessor if an error occurs - this will contain an error message.
I want to map the message to the correct control. How should I do this?
How about having a property in the user class that defines which control has the problem. Then, in your page, you could use FindControl to get a reference to the control that you wish to highlight. _________________ White Papers
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum