Wrox Programmer Forums
|
BOOK: Silverlight 4 Problem - Design - Solution
This is the forum to discuss the Wrox book Silverlight 4 Problem - Design - Solution by Nick Lecrenski; ISBN: 9780470534045
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Silverlight 4 Problem - Design - Solution section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 15th, 2010, 07:13 PM
Authorized User
 
Join Date: Sep 2009
Posts: 34
Thanks: 4
Thanked 1 Time in 1 Post
Default Problem with AccountSettings

When we want to modify the account settings, the program doesn't validate the confirm_password field at all.

All the password fields are empty (Password, ConfirmPassword, SecurityAnswer) so the user doesn't know, does she or he have to fill them in the case, they want to change only for example e-mail or security question. Actually they don't, the program remembers the empty fields content, but the customer doesn't get notification, that these fields have content.

The bound fields (e.mail and security answer) give us a nice property error notification (red label border and error message near the textbox in red), but when the password field validation fails, we give ugly MessageBoxes.

In the AccountSettings.xaml.cs we see, that we set the e-mail textbox and security_question textbox text in the code, but it isn't necessery, because of the twoway databinding.

Moreover, because of the secured security_answer, we had to add client side confirm_securityAnswer field and validation for the same reason as we did that for the password field.

Does anybody has a workaround for these issues?

Thanks

Gabor

Last edited by Gabor66; October 16th, 2010 at 04:31 PM..
 
Old October 20th, 2010, 05:15 AM
Authorized User
 
Join Date: Sep 2009
Posts: 34
Thanks: 4
Thanked 1 Time in 1 Post
Default

In the book we created a new PasswordControl usercontrol because of the built in PasswordBox doesn't supports twoway databinding.

It seems Microsoft fixed this issue, so we can replace the PasswordControls to PasswordBox in SignUp and AccountSettings pages.

After replaced the PasswordControl boxes in the AccountSettings page, the PasswordBoxes now contain the saved items as filled circles.

We store the password and security answer secured with SHA1 algoritms wich converts the parameters to a far more lenghty string, so we have to change the StringLenght validation attribute in these properties to 255.

To get the confirm_password property validation, we have to use the Validator.ValidateAttribute method as described in this thread:

UserRegistration doesn't validate ConfirmPassword field

Because we are using the same dataform control in the signup and registration pages, the best solution to convert them to a user control, and insert them into both pages.

In the Usercontrol we have to raise an event in the Register button, and in the containing pages we have to treat this event appripriately, ie call the UpdateUser or CreateUser method respectively.

Thanks for read this

Gabor

Last edited by Gabor66; October 20th, 2010 at 05:18 AM..









Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.