How avoid the page refresh while checking the confirm pswd??
Am trying to check the confirm password but while checking the confirm password the page is refreshing after it showing empty text box even though the confirm password is matching with password also.I'm using master page so because of contentplaceholder the page is refreshing.So can any one help me how to avoid this page refresh???and I want to check the confirm password textbox with password textbox before clicking on submit button with out page refresh

Ramchand RepalleRank #762 · 3K reputationPosted Jan 28, 2015, 10:10 PM EST
" I want to check the confirm password textbox with password textbox before clicking on submit button with out page refresh "
For that you can achieve at client side only by choosing any one of the option
1. JQuery/ Javascript validation write onchange event for pwd and confirm pwd text boxes and check if those text box values are not empty then check for those values are equal or not.
http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onchange2 (It helps you to implement onchange event)
2. Compare Validator (Validation Controls) in asp.net
http://blogs.msdn.com/b/codefx/archive/2009/09/09/how-to-use-the-asp-net-validation-control-to-validate-the-user-input.aspx
Thanks,
Ramchand
Khargesh RajputRank #616 · 3.9K reputationPosted Jan 28, 2015, 10:14 PM EST
priya AvanigaddaRank #7,836 · 233 reputationPosted Jan 28, 2015, 10:31 PM EST
Thnx for ur reply...I forgot to say ..I tried with Jquery,javascript and asp.net validations also but I'm getting same problem
Khargesh RajputRank #616 · 3.9K reputationPosted Jan 28, 2015, 10:39 PM EST
txtPassword.Attributes.Add("value", Password);
use this code on page load
priya AvanigaddaRank #7,836 · 233 reputationPosted Jan 28, 2015, 10:44 PM EST
Thnx fr ur reply,can u tell me...what is the meaning of value in the above code
Khargesh RajputRank #616 · 3.9K reputationPosted Jan 28, 2015, 11:06 PM EST
in javascript or html we use value="something in textbox";
In html textbox is like
here textbox.attribute is like input aatributes
priya AvanigaddaRank #7,836 · 233 reputationPosted Jan 28, 2015, 11:15 PM EST
U sent like this
txtPassword.Attributes.Add("value", Password);
but for confirm password only I ahve to check so I have to mention like this
txtrtypepswd.attributes.add("onkeyup", "checkPass();") right???I tried for this also ,validation is working properly but the problem is with page refresh
Ramchand RepalleRank #762 · 3K reputationPosted Jan 28, 2015, 11:18 PM EST
http://jsfiddle.net/rpP4K/
priya AvanigaddaRank #7,836 · 233 reputationPosted Jan 28, 2015, 11:21 PM EST