Jump to content
Xtreme .Net Talk

Recommended Posts

Posted
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?
  • Administrators
Posted

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.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...