I have a rather general question but it would be nice if someone could come up with a really good solution with a code example that works....
My situation is quite simple, I have a texbox which is part of a larger webform to register new users in a system. Of course I do not want to get multiple users with the same username, so I would like to perform a check of this textbox as soon as the person making the registration leave the textbox .
Using my references I have come up with the following possible solutions, and would like to know what You guys have experience of being the most elegant one:
2. I can use the onChange event and then write a sub that perform a 'exists' query against the database. However, I guess I would then have to empty the value of the textbox or fill it with something that provokes the user to make another change (to get the onChange event to fire again after the postback). I would of course then also have a postback which causes a page reload.
3. I can use the Custom Validation control to perform a check either client-side or server side doing really the same thing as in the above examples.
I know that this question can be answered in a number of ways, and would encourage a discussion on what the most 'elegant' solution would be.