May 20, 2011, 5:27 PM
[CLOSED] Any way to display a TextField icon when validation is successful?
Hello,
I've got a textfield that asks for your password. I'm using remote validation to check to see if what you entered is correct.
When it's incorrect, the textfield shows a red circle with an exclamation (standard error icon).
If it's correct, I'd like to show a green Tick icon.
Is this possible?
Here's the code snippet:
I've got a textfield that asks for your password. I'm using remote validation to check to see if what you entered is correct.
When it's incorrect, the textfield shows a red circle with an exclamation (standard error icon).
If it's correct, I'd like to show a green Tick icon.
Is this possible?
Here's the code snippet:
<ext:TextField ID="tfCurrentPassword" runat="server" FieldLabel="Current Password"
InputType="Password" AllowBlank="false" IsRemoteValidation="true" MsgTarget="Side">
<RemoteValidation OnValidation="CheckPassword" />
</ext:TextField>
And here's the code behind: Protected Sub CheckPassword(ByVal sender As Object, ByVal e As Ext.Net.RemoteValidationEventArgs)
Dim tfCurrentPassword As Ext.Net.TextField = sender
If Not WAP.Core.Utilities.MD5Hash(tfCurrentPassword.Text) = MyUserAccount.Password_bn Then
e.Success = False
e.ErrorMessage = "The password entered is incorrect"
SaveButton.Disabled = True
Else
e.Success = True
SaveButton.Disabled = False
End If
End Sub
Last edited by Daniil; May 31, 2011 at 10:41 AM.
Reason: Please use [CODE] tags, [CLOSED]