Diesel Posted May 4, 2005 Posted May 4, 2005 I want to create a generic login control. I don't want the control to know about the database or the user object, so I'm thinking I can just use the control to verify that a username and password was entered. Then raise an event when the user clicks the submit button, which queries the database (using the username/pass from properties of the control), and if an invalid username/password occurs, simply re-Show the control. Is this good design? Quote
Administrators PlausiblyDamp Posted May 4, 2005 Administrators Posted May 4, 2005 You may want to look at defining a delegate (and possibly related interfaces / classes) which the control itself calls to do the validation. The application that uses your control would then have to provide a valid implementation for the actual validation logic. Is this for a web or windows app? If web you may want to look at the Paterns and Practices bit of MS's site - either the security application block or even the Enterprise Library for a more fully fledged solution. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.